Ejemplo n.º 1
0
 /** Skips over one Text in the input. */
 public static void skip(DataInput in) throws IOException {
   int length = WritableUtils.readVInt(in);
   WritableUtils.skipFully(in, length);
 }
Ejemplo n.º 2
0
 /** Read a UTF8 encoded string from in */
 public static String readString(DataInput in) throws IOException {
   int length = WritableUtils.readVInt(in);
   byte[] bytes = new byte[length];
   in.readFully(bytes, 0, length);
   return decode(bytes);
 }
Ejemplo n.º 3
0
 /** deserialize */
 public void readFields(DataInput in) throws IOException {
   int newLength = WritableUtils.readVInt(in);
   setCapacity(newLength, false);
   in.readFully(bytes, 0, newLength);
   length = newLength;
 }