public class LogOutputStream extends OutputStream
OutputStream
Constructor and Description |
---|
LogOutputStream(RandomAccessFile raf)
Creates an output file with the specified
RandomAccessFile |
Modifier and Type | Method and Description |
---|---|
void |
close()
A LogOutputStream cannot be closed, so this does nothing.
|
void |
write(byte[] b)
Writes an array of bytes.
|
void |
write(byte[] b,
int off,
int len)
Writes a sub-array of bytes.
|
void |
write(int b)
Writes a byte of data.
|
flush
public LogOutputStream(RandomAccessFile raf) throws IOException
RandomAccessFile
raf
- the output fileIOException
- If an I/O error has occurred.public void write(int b) throws IOException
write
in class OutputStream
b
- the byte to be writtenIOException
- If an I/O error has occurred.public void write(byte[] b) throws IOException
write
in class OutputStream
b
- the data to be writtenIOException
- If an I/O error has occurred.public void write(byte[] b, int off, int len) throws IOException
write
in class OutputStream
b
- the data to be writtenoff
- the start offset in the datalen
- the number of bytes to writeIOException
- If an I/O error has occurred.public final void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
- If an I/O error has occurred.Copyright © 2016–2018. All rights reserved.