Package org.lilyproject.bytes.api

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


        Assert.assertEquals(d, dataInput.readDouble(), 0.0001);
        Assert.assertEquals(f, dataInput.readFloat(), 0.0001);
        Assert.assertEquals(i, dataInput.readInt());
        Assert.assertEquals(l, dataInput.readLong());
        Assert.assertEquals(s, dataInput.readShort());
        Assert.assertEquals(string, dataInput.readUTF());
        Assert.assertEquals(Math.abs(i), dataInput.readVInt());
        Assert.assertEquals(Math.abs(l), dataInput.readVLong());
    }

    public void testIndexOf() {
View Full Code Here


            String string = randomUnicodeString();
            DataOutput dataOutput = new DataOutputImpl();
            dataOutput.writeUTF(string);
            byte[] bytes = dataOutput.toByteArray();
            DataInput dataInput = new DataInputImpl(bytes);
            String result = dataInput.readUTF();
            Assert.assertEquals(string, result);
        }
    }

    public void testRandomVString() {
View Full Code Here

        return dataOutput.toByteArray();
    }

    public static QName decodeName(byte[] bytes) {
        DataInput dataInput = new DataInputImpl(bytes);
        String namespace = dataInput.readUTF();
        String name = dataInput.readUTF();
        return new QName(namespace, name);
    }

    /**
 
View Full Code Here

    }

    public static QName decodeName(byte[] bytes) {
        DataInput dataInput = new DataInputImpl(bytes);
        String namespace = dataInput.readUTF();
        String name = dataInput.readUTF();
        return new QName(namespace, name);
    }

    /**
     * Generates a SchemaId based on a uuid and checks if it's not already in use
View Full Code Here

        DataInput dataInput = new DataInputImpl(bytes);
        if (valueTypeEncodingVersion != dataInput.readByte()) {
            throw new TypeException("Unknown value type encoding version encountered in schema");
        }

        return getValueType(dataInput.readUTF());
    }

    private boolean isDeletedField(byte[] value) {
        return value[0] == DELETE_FLAG;
    }
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.