org.jclarion.clarion
Class ClarionRandomAccessCharFile

java.lang.Object
  extended by org.jclarion.clarion.ClarionRandomAccessCharFile
Direct Known Subclasses:
CharClarionFile

public abstract class ClarionRandomAccessCharFile
extends java.lang.Object

Model a random access char file Unlike random access file, methods that deal with positions, length(), seek() etc will not necessarily count chars - they may be counting bytes. So do not assume that calling read() will cause position to increment by 1. It may increment more than this depdending on the underlying character set used

Author:
barney

Constructor Summary
ClarionRandomAccessCharFile()
           
 
Method Summary
abstract  void close()
           
abstract  java.lang.String getName()
           
abstract  long length()
           
abstract  long position()
           
abstract  int read()
           
 int read(char[] get_buffer, int ofset, int len)
           
abstract  void seek(long l)
           
abstract  void write(char[] bytes, int i, int size)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClarionRandomAccessCharFile

public ClarionRandomAccessCharFile()
Method Detail

length

public abstract long length()
                     throws java.io.IOException
Throws:
java.io.IOException

position

public abstract long position()
                       throws java.io.IOException
Throws:
java.io.IOException

close

public abstract void close()
                    throws java.io.IOException
Throws:
java.io.IOException

seek

public abstract void seek(long l)
                   throws java.io.IOException
Throws:
java.io.IOException

read

public abstract int read()
                  throws java.io.IOException
Throws:
java.io.IOException

read

public int read(char[] get_buffer,
                int ofset,
                int len)
         throws java.io.IOException
Throws:
java.io.IOException

write

public abstract void write(char[] bytes,
                           int i,
                           int size)
                    throws java.io.IOException
Throws:
java.io.IOException

getName

public abstract java.lang.String getName()


Copyright © 2010. All Rights Reserved.