public class FileStream extends java.lang.Object implements SeekableInputStream, SeekableOutputStream
| Modifier and Type | Field and Description |
|---|---|
protected java.io.RandomAccessFile |
file |
SEEK_CUR, SEEK_END, SEEK_SET| Constructor and Description |
|---|
FileStream(java.io.File path,
java.lang.String mode) |
FileStream(java.lang.String path,
java.lang.String mode) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
position() |
int |
read(byte[] buf) |
long |
seek(long offset,
int whence) |
void |
truncate() |
void |
write(byte[] buf,
int off,
int len) |
public FileStream(java.lang.String path,
java.lang.String mode)
throws java.io.IOException
java.io.IOExceptionpublic FileStream(java.io.File path,
java.lang.String mode)
throws java.io.IOException
java.io.IOExceptionpublic int read(byte[] buf)
throws java.io.IOException
read in interface SeekableInputStreamjava.io.IOExceptionpublic void write(byte[] buf,
int off,
int len)
throws java.io.IOException
write in interface SeekableOutputStreamjava.io.IOExceptionpublic long seek(long offset,
int whence)
throws java.io.IOException
seek in interface SeekableStreamjava.io.IOExceptionpublic long position()
throws java.io.IOException
position in interface SeekableStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
java.io.IOExceptionpublic void truncate()
throws java.io.IOException
truncate in interface SeekableOutputStreamjava.io.IOException