public byte[] readVarbyte() throws IOException {
    int varbyteLength = readUnsignedShort();
    byte[] varbyteContent = new byte[varbyteLength];
    int numOfBytesRead = in.read(varbyteContent);
    if (varbyteContent.length != 0 && numOfBytesRead != varbyteLength) {
      throw new EOFException(
          format("Fail to read the varbyte. Expect %d bytes, get %d bytes", varbyteLength, numOfBytesRead));
    }
    return varbyteContent;
  }
Read VARBYTE(N).
The representation of VARBYTE in Teradata binary format is:
the first two bytes represent the length N of this varchar field
the next N bytes represent the content of this varchar field.
To pad the null varbyte, the length will be 0 and the content will be none.

@return the byte [ ]
@throws IOException the io exception
serde/src/java/org/apache/hadoop/hive/serde2/teradata/TeradataBinaryDataInputStream.java