@InterfaceAudience.Private public class ByteBufferWriterOutputStream extends OutputStream implements ByteBufferWriter
Constructor and Description |
---|
ByteBufferWriterOutputStream(OutputStream os) |
ByteBufferWriterOutputStream(OutputStream os,
int size) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush() |
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 to
this OutputStream.
|
void |
write(int b) |
void |
writeInt(int i)
Writes an
int to the underlying output stream as four bytes, high byte first. |
write
public ByteBufferWriterOutputStream(OutputStream os)
public ByteBufferWriterOutputStream(OutputStream os, int size)
public void write(ByteBuffer b, int off, int len) throws IOException
write
in interface ByteBufferWriter
b
- the ByteBufferoff
- the start offset in the datalen
- the number of bytes to writeIOException
- if an I/O error occurs. In particular, an IOException is thrown
if the output stream is closed.public void writeInt(int i) throws IOException
ByteBufferWriter
int
to the underlying output stream as four bytes, high byte first.writeInt
in interface ByteBufferWriter
i
- the int
to writeIOException
- if an I/O error occurs.public void write(int b) throws IOException
write
in class OutputStream
IOException
public void write(byte[] b, int off, int len) throws IOException
write
in class OutputStream
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
Copyright © 2007–2019 Cloudera. All rights reserved.