Package org.lilyproject.bytes.api

Examples of org.lilyproject.bytes.api.DataInput.readByte()


        dataOutput.writeVLong(Math.abs(l));

        byte[] data = dataOutput.toByteArray();
        DataInput dataInput = new DataInputImpl(data);
        Assert.assertEquals(b, dataInput.readBoolean());
        Assert.assertEquals(bytes[0], dataInput.readByte());
        Assert.assertArrayEquals(bytes, dataInput.readBytes(10));
        Assert.assertEquals(d, dataInput.readDouble(), 0.0001);
        Assert.assertEquals(f, dataInput.readFloat(), 0.0001);
        Assert.assertEquals(i, dataInput.readInt());
        Assert.assertEquals(l, dataInput.readLong());
View Full Code Here


        return dataOutput.toByteArray();
    }

    private ValueType decodeValueType(byte[] bytes) throws RepositoryException, InterruptedException {
        DataInput dataInput = new DataInputImpl(bytes);
        if (valueTypeEncodingVersion != dataInput.readByte()) {
            throw new TypeException("Unknown value type encoding version encountered in schema");
        }

        return getValueType(dataInput.readUTF());
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.