Package org.apache.thrift.protocol

Examples of org.apache.thrift.protocol.TList


    }

    public boolean[] readBoolArray()
            throws TException
    {
        TList list = protocol.readListBegin();
        boolean[] array = new boolean[list.size];
        for (int i = 0; i < list.size; i++) {
            array[i] = readBool();
        }
        protocol.readListEnd();
View Full Code Here


    }

    public short[] readI16Array()
            throws TException
    {
        TList list = protocol.readListBegin();
        short[] array = new short[list.size];
        for (int i = 0; i < list.size; i++) {
            array[i] = readI16();
        }
        protocol.readListEnd();
View Full Code Here

    }

    public int[] readI32Array()
            throws TException
    {
        TList list = protocol.readListBegin();
        int[] array = new int[list.size];
        for (int i = 0; i < list.size; i++) {
            array[i] = readI32();
        }
        protocol.readListEnd();
View Full Code Here

    }

    public long[] readI64Array()
            throws TException
    {
        TList list = protocol.readListBegin();
        long[] array = new long[list.size];
        for (int i = 0; i < list.size; i++) {
            array[i] = readI64();
        }
        protocol.readListEnd();
View Full Code Here

    }

    public double[] readDoubleArray()
            throws TException
    {
        TList list = protocol.readListBegin();
        double[] array = new double[list.size];
        for (int i = 0; i < list.size; i++) {
            array[i] = readDouble();
        }
        protocol.readListEnd();
View Full Code Here

    }

    public <E> List<E> readList(ThriftCodec<E> elementCodec)
            throws Exception
    {
        TList tList = protocol.readListBegin();
        List<E> list = new ArrayList<>();
        for (int i = 0; i < tList.size; i++) {
            try {
                E element = elementCodec.read(protocol);
                list.add(element);
View Full Code Here

    }

    public void writeBoolArray(boolean[] array)
            throws TException
    {
        protocol.writeListBegin(new TList(TType.BOOL, array.length));
        for (boolean booleanValue : array) {
            writeBool(booleanValue);
        }
        protocol.writeListEnd();
    }
View Full Code Here

    }

    public void writeI16Array(short[] array)
            throws TException
    {
        protocol.writeListBegin(new TList(TType.I16, array.length));
        for (int i16 : array) {
            writeI32(i16);
        }
        protocol.writeListEnd();
    }
View Full Code Here

    }

    public void writeI32Array(int[] array)
            throws TException
    {
        protocol.writeListBegin(new TList(TType.I32, array.length));
        for (int i32 : array) {
            writeI32(i32);
        }
        protocol.writeListEnd();
    }
View Full Code Here

    }

    public void writeI64Array(long[] array)
            throws TException
    {
        protocol.writeListBegin(new TList(TType.I64, array.length));
        for (long i64 : array) {
            writeI64(i64);
        }
        protocol.writeListEnd();
    }
View Full Code Here

TOP

Related Classes of org.apache.thrift.protocol.TList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.