public class TFacebookCompactProtocol extends Object implements TProtocol
| Constructor and Description |
|---|
TFacebookCompactProtocol(TTransport transport)
Create a TCompactProtocol.
|
| Modifier and Type | Method and Description |
|---|---|
ByteBuffer |
readBinary()
Read a byte[] from the wire.
|
int |
readBinary(byte[] buf,
int offset)
Read data from wire directly into the buffer.
|
boolean |
readBool()
Read a boolean off the wire.
|
byte |
readByte()
Read a single byte off the wire.
|
double |
readDouble()
No magic here - just read a double off the wire.
|
TField |
readFieldBegin()
Read a field header off the wire.
|
void |
readFieldEnd() |
float |
readFloat()
No magic here - just read a float off the wire.
|
short |
readI16()
Read an i16 from the wire as a zigzag varint.
|
int |
readI32()
Read an i32 from the wire as a zigzag varint.
|
long |
readI64()
Read an i64 from the wire as a zigzag varint.
|
TList |
readListBegin()
Read a list header off the wire.
|
void |
readListEnd() |
TMap |
readMapBegin()
Read a map header off the wire.
|
void |
readMapEnd() |
TMessage |
readMessageBegin()
Read a message header.
|
void |
readMessageEnd() |
TSet |
readSetBegin()
Read a set header off the wire.
|
void |
readSetEnd() |
String |
readString()
Reads a byte[] (via readBinary), and then UTF-8 decodes it.
|
TStruct |
readStructBegin()
Read a struct begin.
|
void |
readStructEnd()
Doesn't actually consume any wire data, just removes the last field for
this struct from the field stack.
|
void |
writeBinary(ByteBuffer value)
Write a byte array, using a varint for the size.
|
void |
writeBool(boolean value)
Write a boolean value.
|
void |
writeByte(byte value)
Write a byte.
|
void |
writeDouble(double value)
Write a double to the wire as 8 bytes.
|
void |
writeFieldBegin(TField field)
Write a field header containing the field id and field type.
|
void |
writeFieldEnd() |
void |
writeFieldStop()
Write the STOP symbol so we know there are no more fields in this struct.
|
void |
writeFloat(float value)
Write a float to the wire as 4 bytes.
|
void |
writeI16(short value)
Write an I16 as a zigzag varint.
|
void |
writeI32(int value)
Write an i32 as a zigzag varint.
|
void |
writeI64(long value)
Write an i64 as a zigzag varint.
|
void |
writeListBegin(TList list)
Write a list header.
|
void |
writeListEnd() |
void |
writeMapBegin(TMap map)
Write a map header.
|
void |
writeMapEnd() |
void |
writeMessageBegin(TMessage message)
Write a message header to the wire.
|
void |
writeMessageEnd() |
void |
writeSetBegin(TSet set)
Write a set header.
|
void |
writeSetEnd() |
void |
writeString(String value)
Write a string to the wire with a varint size preceding.
|
void |
writeStructBegin(TStruct struct)
Write a struct begin.
|
void |
writeStructEnd()
Write a struct end.
|
public TFacebookCompactProtocol(TTransport transport)
transport - the TTransport object to read from or write to.public void writeMessageBegin(TMessage message) throws TException
writeMessageBegin in interface TProtocolWriterTExceptionpublic void writeStructBegin(TStruct struct)
writeStructBegin in interface TProtocolWriterpublic void writeStructEnd()
writeStructEnd in interface TProtocolWriterpublic void writeFieldBegin(TField field) throws TException
writeFieldBegin in interface TProtocolWriterTExceptionpublic void writeFieldStop()
throws TException
writeFieldStop in interface TProtocolWriterTExceptionpublic void writeMapBegin(TMap map) throws TException
writeMapBegin in interface TProtocolWriterTExceptionpublic void writeListBegin(TList list) throws TException
writeListBegin in interface TProtocolWriterTExceptionpublic void writeSetBegin(TSet set) throws TException
writeSetBegin in interface TProtocolWriterTExceptionpublic void writeBool(boolean value)
throws TException
writeBool in interface TProtocolWriterTExceptionpublic void writeByte(byte value)
throws TException
writeByte in interface TProtocolWriterTExceptionpublic void writeI16(short value)
throws TException
writeI16 in interface TProtocolWriterTExceptionpublic void writeI32(int value)
throws TException
writeI32 in interface TProtocolWriterTExceptionpublic void writeI64(long value)
throws TException
writeI64 in interface TProtocolWriterTExceptionpublic void writeFloat(float value)
throws TException
writeFloat in interface TProtocolWriterTExceptionpublic void writeDouble(double value)
throws TException
writeDouble in interface TProtocolWriterTExceptionpublic void writeString(String value) throws TException
writeString in interface TProtocolWriterTExceptionpublic void writeBinary(ByteBuffer value) throws TException
writeBinary in interface TProtocolWriterTExceptionpublic void writeMessageEnd()
writeMessageEnd in interface TProtocolWriterpublic void writeMapEnd()
writeMapEnd in interface TProtocolWriterpublic void writeListEnd()
writeListEnd in interface TProtocolWriterpublic void writeSetEnd()
writeSetEnd in interface TProtocolWriterpublic void writeFieldEnd()
writeFieldEnd in interface TProtocolWriterpublic TMessage readMessageBegin() throws TException
readMessageBegin in interface TProtocolReaderTExceptionpublic TStruct readStructBegin()
readStructBegin in interface TProtocolReaderpublic void readStructEnd()
readStructEnd in interface TProtocolReaderpublic TField readFieldBegin() throws TException
readFieldBegin in interface TProtocolReaderTExceptionpublic TMap readMapBegin() throws TException
readMapBegin in interface TProtocolReaderTExceptionpublic TList readListBegin() throws TException
readListBegin in interface TProtocolReaderTExceptionpublic TSet readSetBegin() throws TException
readSetBegin in interface TProtocolReaderTExceptionpublic boolean readBool()
throws TException
readBool in interface TProtocolReaderTExceptionpublic byte readByte()
throws TException
readByte in interface TProtocolReaderTExceptionpublic short readI16()
throws TException
readI16 in interface TProtocolReaderTExceptionpublic int readI32()
throws TException
readI32 in interface TProtocolReaderTExceptionpublic long readI64()
throws TException
readI64 in interface TProtocolReaderTExceptionpublic float readFloat()
throws TException
readFloat in interface TProtocolReaderTExceptionpublic double readDouble()
throws TException
readDouble in interface TProtocolReaderTExceptionpublic String readString() throws TException
readString in interface TProtocolReaderTExceptionpublic ByteBuffer readBinary() throws TException
readBinary in interface TProtocolReaderTExceptionpublic int readBinary(byte[] buf,
int offset)
throws TException
readBinary in interface TProtocolReaderTExceptionpublic void readMessageEnd()
readMessageEnd in interface TProtocolReaderpublic void readFieldEnd()
readFieldEnd in interface TProtocolReaderpublic void readMapEnd()
readMapEnd in interface TProtocolReaderpublic void readListEnd()
readListEnd in interface TProtocolReaderpublic void readSetEnd()
readSetEnd in interface TProtocolReaderCopyright © 2012–2024. All rights reserved.