Code example for DataInput

Methods: readFullyreadInt

0
        } 
 
        public Token deserialize(DataInput dis) throws IOException
        { 
            IPartitioner p = StorageService.getPartitioner();
            int size = dis.readInt();
            byte[] bytes = new byte[size];
            dis.readFully(bytes);
            return p.getTokenFactory().fromByteArray(ByteBuffer.wrap(bytes));
        } 
    } 
}