public class RandomAccessOutputStream
extends java.io.OutputStream
Constructor and Description |
---|
RandomAccessOutputStream(java.io.RandomAccessFile outFile)
Construct RandomAccessOutputStream from file.
|
RandomAccessOutputStream(java.lang.String file,
java.lang.String mode)
Construct RandomAccessOutputStream from filename.
|
Modifier and Type | Method and Description |
---|---|
void |
seek(long pos)
Seek file position.
|
void |
write(byte[] buf,
int off,
int len) |
void |
write(int b) |
public RandomAccessOutputStream(java.io.RandomAccessFile outFile)
outFile
- RamdomAccessFilepublic RandomAccessOutputStream(java.lang.String file, java.lang.String mode) throws java.io.IOException
file
- to write with random access.mode
- open mode.java.io.IOException
- if an I/O error has occurred.public final void write(byte[] buf, int off, int len) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public final void write(int b) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public final void seek(long pos) throws java.io.IOException
pos
- file position in byte.java.io.IOException
- if an I/O error has occurred.