Esempio n. 1
0
  private int readInt(ExtendedDataInput in) throws IOException {
    if (DEBUG) {
      byte type = in.readByte();
      if (DEBUG_INT != type) {
        throw new IOException("Not an integer value (type=" + type + ")"); // $NON-NLS-1$
      }
    }

    int value = in.readInt();
    if (DEBUG) {
      trace("readInt", value);
    }

    return value;
  }
Esempio n. 2
0
  /** @since 3.0 */
  protected String readString(ExtendedDataInput in) throws IOException {
    if (DEBUG) {
      byte type = in.readByte();
      if (DEBUG_STRING != type) {
        throw new IOException("Not a string value (type=" + type + ")"); // $NON-NLS-1$
      }
    }

    String value = in.readString();
    if (DEBUG) {
      trace("readString", value);
    }

    return value;
  }
Esempio n. 3
0
  private byte readByte(ExtendedDataInput in) throws IOException {
    if (DEBUG) {
      byte type = in.readByte();
      if (DEBUG_BYTE != type) {
        throw new IOException("Not a byte value (type=" + type + ")"); // $NON-NLS-1$
      }
    }

    byte value = in.readByte();
    if (DEBUG) {
      trace("readByte", value);
    }

    return value;
  }