Search in sources :

Example 6 with TMemoryInputTransport

use of org.apache.thrift.transport.TMemoryInputTransport in project jena by apache.

the class ThriftConverter method getInputTransport.

private static TMemoryInputTransport getInputTransport() {
    TMemoryInputTransport transport = inputTransports.get();
    if (transport != null)
        return transport;
    transport = new TMemoryInputTransport();
    inputTransports.set(transport);
    return transport;
}
Also used : TMemoryInputTransport(org.apache.thrift.transport.TMemoryInputTransport)

Example 7 with TMemoryInputTransport

use of org.apache.thrift.transport.TMemoryInputTransport in project jena by apache.

the class ThriftConverter method fromBytes.

public static void fromBytes(byte[] bs, RDF_Term term) throws TException {
    TMemoryInputTransport transport = getInputTransport();
    transport.reset(bs);
    TProtocol protocol = getInputProtocol();
    term.read(protocol);
}
Also used : TProtocol(org.apache.thrift.protocol.TProtocol) TMemoryInputTransport(org.apache.thrift.transport.TMemoryInputTransport)

Aggregations

TMemoryInputTransport (org.apache.thrift.transport.TMemoryInputTransport)7 TProtocol (org.apache.thrift.protocol.TProtocol)3 TException (org.apache.thrift.TException)2 TJSONProtocol (org.apache.thrift.protocol.TJSONProtocol)2 Message (com.twitter.distributedlog.benchmark.thrift.Message)1 AccessControlEntry (com.twitter.distributedlog.thrift.AccessControlEntry)1 BKDLConfigFormat (com.twitter.distributedlog.thrift.BKDLConfigFormat)1 IOException (java.io.IOException)1 TBinaryProtocol (org.apache.thrift.protocol.TBinaryProtocol)1