ByteArrayWriter
public final class RandomAccessFileWriter extends java.lang.Object implements ByteArrayWriter
RandomAccessFile
as writer.Constructor | Description |
---|---|
RandomAccessFileWriter(java.io.RandomAccessFile file) |
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
Closes this writer and releases any associated system resources.
|
void |
flush() |
Forces writing of any buffered data.
|
void |
write(byte[] data,
int length) |
Outputs a byte array.
|
public RandomAccessFileWriter(java.io.RandomAccessFile file)
file
- Underlying random access filepublic void write(byte[] data, int length) throws java.io.IOException
ByteArrayWriter
write
in interface ByteArrayWriter
data
- Byte array to outputlength
- Number of bytes to outputjava.io.IOException
- Writing failedpublic void flush()
ByteArrayWriter
flush
in interface ByteArrayWriter
public void close() throws java.io.IOException
ByteArrayWriter
close
in interface ByteArrayWriter
java.io.IOException
- Closing failedCopyright © 2021. All rights reserved.