public final class CachedFileWriter extends AbstractWriter implements Writer
Modifier and Type | Field and Description |
---|---|
private byte[] |
cache |
private int |
cachelen |
private long |
cachestart |
private java.io.RandomAccessFile |
RAFile |
file, name
Constructor and Description |
---|
CachedFileWriter(java.io.File file) |
Modifier and Type | Method and Description |
---|---|
long |
available() |
private void |
checkReopen() |
void |
close() |
protected void |
finalize() |
long |
length() |
void |
readFully(byte[] b,
int off,
int len) |
void |
seek(long pos) |
void |
setLength(long length) |
void |
write(byte[] b,
int off,
int len) |
deleteOnExit, int2array, readMap, write, writeInt, writeLine, writeLine, writeLong, writeMap, writeShort
file, name, readFully, readInt, readLong, readShort
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
deleteOnExit, readMap, write, writeInt, writeLine, writeLong, writeMap, writeShort
private java.io.RandomAccessFile RAFile
private byte[] cache
private long cachestart
private int cachelen
public CachedFileWriter(java.io.File file) throws java.io.IOException, java.io.FileNotFoundException
java.io.IOException
java.io.FileNotFoundException
public final long length() throws java.io.IOException
length
in interface Reader
length
in class AbstractReader
java.io.IOException
public final void setLength(long length) throws java.io.IOException
setLength
in interface Writer
setLength
in class AbstractWriter
java.io.IOException
public final long available() throws java.io.IOException
available
in interface Reader
available
in class AbstractReader
java.io.IOException
public final void readFully(byte[] b, int off, int len) throws java.io.IOException
readFully
in interface Reader
readFully
in class AbstractReader
java.io.IOException
public final void write(byte[] b, int off, int len) throws java.io.IOException
write
in interface Writer
write
in class AbstractWriter
java.io.IOException
public final void seek(long pos) throws java.io.IOException
seek
in interface Reader
seek
in class AbstractReader
java.io.IOException
public final void close()
close
in interface Reader
close
in class AbstractReader
private final void checkReopen()
protected final void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable