public class OutputStreamDataOutput extends DataOutput implements java.io.Closeable
DataOutput
wrapping a plain OutputStream
.Constructor and Description |
---|
OutputStreamDataOutput(java.io.OutputStream os) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
writeByte(byte b)
Writes a single byte.
|
void |
writeBytes(byte[] b,
int offset,
int length)
Writes an array of bytes.
|
copyBytes, writeBytes, writeChars, writeChars, writeInt, writeLong, writeShort, writeString, writeStringStringMap, writeVInt, writeVLong
public void writeByte(byte b) throws java.io.IOException
DataOutput
writeByte
in class DataOutput
java.io.IOException
DataInput.readByte()
public void writeBytes(byte[] b, int offset, int length) throws java.io.IOException
DataOutput
writeBytes
in class DataOutput
b
- the bytes to writeoffset
- the offset in the byte arraylength
- the number of bytes to writejava.io.IOException
DataInput.readBytes(byte[],int,int)
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException
Copyright © 2000-2023 Apache Software Foundation. All Rights Reserved.