|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
org.apache.cassandra.io.util.AbstractDataOutput
org.apache.cassandra.utils.vint.EncodedDataOutputStream
public class EncodedDataOutputStream
Borrows idea from https://developers.google.com/protocol-buffers/docs/encoding#varints
Constructor Summary | |
---|---|
EncodedDataOutputStream(java.io.OutputStream out)
|
Method Summary | |
---|---|
void |
write(byte[] b)
Writes the entire contents of the byte array buffer to
this RandomAccessFile starting at the current file pointer. |
void |
write(byte[] b,
int off,
int len)
Writes count bytes from the byte array buffer
starting at offset to this RandomAccessFile starting at
the current file pointer.. |
void |
write(int b)
Writes the specified byte oneByte to this RandomAccessFile
starting at the current file pointer. |
void |
writeInt(int v)
Writes a 32-bit int to this output stream. |
void |
writeLong(long v)
Writes a 64-bit long to this output stream. |
void |
writeShort(int v)
Writes the specified 16-bit short to the OutputStream. |
Methods inherited from class org.apache.cassandra.io.util.AbstractDataOutput |
---|
writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeUTF |
Methods inherited from class java.io.OutputStream |
---|
close, flush |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EncodedDataOutputStream(java.io.OutputStream out)
Method Detail |
---|
public void write(int b) throws java.io.IOException
AbstractDataOutput
oneByte
to this RandomAccessFile
starting at the current file pointer. Only the low order byte of
oneByte
is written.
write
in interface java.io.DataOutput
write
in class AbstractDataOutput
b
- the byte to be written
java.io.IOException
- If an error occurs attempting to write to this
RandomAccessFile.public void write(byte[] b) throws java.io.IOException
AbstractDataOutput
buffer
to
this RandomAccessFile starting at the current file pointer.
write
in interface java.io.DataOutput
write
in class AbstractDataOutput
b
- the buffer to be written.
java.io.IOException
- If an error occurs trying to write to this RandomAccessFile.public void write(byte[] b, int off, int len) throws java.io.IOException
AbstractDataOutput
count
bytes from the byte array buffer
starting at offset
to this RandomAccessFile starting at
the current file pointer..
write
in interface java.io.DataOutput
write
in class AbstractDataOutput
b
- the bytes to be writtenoff
- offset in buffer to get byteslen
- number of bytes in buffer to write
java.io.IOException
- If an error occurs attempting to write to this
RandomAccessFile.public void writeInt(int v) throws java.io.IOException
AbstractDataOutput
writeInt
in interface java.io.DataOutput
writeInt
in class AbstractDataOutput
v
- the int to be written.
java.io.IOException
- If an error occurs attempting to write to this
DataOutputStream.public void writeLong(long v) throws java.io.IOException
AbstractDataOutput
writeLong
in interface java.io.DataOutput
writeLong
in class AbstractDataOutput
v
- the long to be written.
java.io.IOException
- If an error occurs attempting to write to this
DataOutputStream.public void writeShort(int v) throws java.io.IOException
AbstractDataOutput
writeShort
in interface java.io.DataOutput
writeShort
in class AbstractDataOutput
v
- the short to be written
java.io.IOException
- If an error occurs attempting to write to this
DataOutputStream.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |