@Immutable public class OptionalIntThriftCodec extends Object implements ThriftCodec<OptionalInt>
| Constructor and Description |
|---|
OptionalIntThriftCodec() |
| Modifier and Type | Method and Description |
|---|---|
ThriftType |
getType()
The Thrift type this codec supports.
|
boolean |
isNull(OptionalInt value)
If the value is effectively null and should not be written.
|
OptionalInt |
read(TProtocolReader protocol)
Reads a value from supplied Thrift protocol reader.
|
void |
write(OptionalInt value,
TProtocolWriter protocol)
Writes a value to the supplied Thrift protocol writer.
|
public ThriftType getType()
ThriftCodecgetType in interface ThriftCodec<OptionalInt>public OptionalInt read(TProtocolReader protocol) throws Exception
ThriftCodecread in interface ThriftCodec<OptionalInt>protocol - the protocol to read fromException - if any problems occurred when reading or coercing the valuepublic void write(OptionalInt value, TProtocolWriter protocol) throws Exception
ThriftCodecwrite in interface ThriftCodec<OptionalInt>value - the value to write; not nullprotocol - the protocol to write toException - if any problems occurred when writing or coercing the valuepublic boolean isNull(OptionalInt value)
ThriftCodecisNull in interface ThriftCodec<OptionalInt>value - the value to testCopyright © 2012–2018. All rights reserved.