public class RandomAccessFileOutputStream extends java.io.OutputStream
RandomAccessFile into a usable
OutputStream which supports random re-position.
Re-positioning is done by using seek() on the RandomAccessFile
object. (@see RandomAccessFile#seek())| Modifier and Type | Field and Description |
|---|---|
protected java.io.RandomAccessFile |
raf
Encapsulated
RandomAccessFile used for stream data. |
| Constructor and Description |
|---|
RandomAccessFileOutputStream(java.io.RandomAccessFile raf)
Create a new random access
OutputStream with repositioning
capabilities. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closing this stream has no effect.
|
void |
flush()
Flushing this stream has no effect.
|
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
protected java.io.RandomAccessFile raf
RandomAccessFile used for stream data.public RandomAccessFileOutputStream(java.io.RandomAccessFile raf)
OutputStream with repositioning
capabilities.raf - RandomAccessFile used for stream datapublic void close() throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.OutputStreamjava.io.IOException - if an I/O error occurs while closing streampublic void flush() throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOException - if an I/O error occurs while flushing streampublic void write(int b) throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] b) throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] b, int off, int len) throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionCopyright © 2011–2023. All rights reserved.