List of usage examples for com.google.common.io LittleEndianDataInputStream readShort
@Override public short readShort() throws IOException
From source file:org.linguafranca.pwdb.kdbx.stream_3_1.KdbxSerializer.java
private static byte[] getByteArray(LittleEndianDataInputStream ledis) throws IOException { short fieldLength = ledis.readShort(); byte[] value = new byte[fieldLength]; ledis.readFully(value);/*from www . j ava2s . com*/ return value; }
From source file:org.linguafranca.pwdb.kdbx.stream_3_1.KdbxSerializer.java
private static int getInt(LittleEndianDataInputStream ledis) throws IOException { short fieldLength = ledis.readShort(); if (fieldLength != 4) { throw new IllegalStateException("Int required but length was " + fieldLength); }/*from ww w . j a v a2 s. c o m*/ return ledis.readInt(); }
From source file:org.linguafranca.pwdb.kdbx.stream_3_1.KdbxSerializer.java
private static long getLong(LittleEndianDataInputStream ledis) throws IOException { short fieldLength = ledis.readShort(); if (fieldLength != 8) { throw new IllegalStateException("Long required but length was " + fieldLength); }//from ww w . j a va 2 s.com return ledis.readLong(); }