private static final class AsyncProtobufLogWriter.OutputStreamWrapper extends OutputStream implements ByteBufferWriter
| Modifier and Type | Field and Description |
|---|---|
private byte[] |
oneByteBuf |
private AsyncFSOutput |
out |
| Constructor and Description |
|---|
OutputStreamWrapper(AsyncFSOutput out) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
write(byte[] b,
int off,
int len) |
void |
write(ByteBuffer b,
int off,
int len)
Writes
len bytes from the specified ByteBuffer starting at offset off |
void |
write(int b) |
void |
writeInt(int i)
Writes an
int to the underlying output stream as four bytes, high byte first. |
flush, writeprivate final AsyncFSOutput out
private final byte[] oneByteBuf
public OutputStreamWrapper(AsyncFSOutput out)
public void write(int b) throws IOException
write in class OutputStreamIOExceptionpublic void write(ByteBuffer b, int off, int len) throws IOException
ByteBufferWriterlen bytes from the specified ByteBuffer starting at offset offwrite in interface ByteBufferWriterb - the data.off - the start offset in the data.len - the number of bytes to write.IOException - if an I/O error occurs.public void writeInt(int i) throws IOException
ByteBufferWriterint to the underlying output stream as four bytes, high byte first.writeInt in interface ByteBufferWriteri - the int to writeIOException - if an I/O error occurs.public void write(byte[] b, int off, int len) throws IOException
write in class OutputStreamIOExceptionpublic void close() throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.