/** * Parses the byte buffer argument as if it was an int value and returns the * result. Throws NumberFormatException if the byte array does not represent an * int quantity. * * @return int the value represented by the argument * @throws NumberFormatException if the argument could not be parsed as an int quantity. */ public static int parseInt(ByteBuf bytes, int start, int length) { return parseInt(bytes, start, length, 10); }
return parseInt(bytes.array(), start, length);
/** * Parses the byte buffer argument as if it was an int value and returns the * result. Throws NumberFormatException if the byte array does not represent an * int quantity. * * @return int the value represented by the argument * @throws NumberFormatException if the argument could not be parsed as an int quantity. */ public static int parseInt(ByteBuf bytes, int start, int length) { return parseInt(bytes, start, length, 10); }
return parseInt(bytes.array(), start, length);
/** * Parses the byte array argument as if it was an int value and returns the * result. Throws NumberFormatException if the byte array does not represent an * int quantity. * * @return int the value represented by the argument * @throws NumberFormatException if the argument could not be parsed as an int quantity. */ public static int parseInt(byte[] bytes, int start, int length) { return parseInt(bytes, start, length, 10); }
/** * Parses the byte array argument as if it was an int value and returns the * result. Throws NumberFormatException if the byte array does not represent an * int quantity. * * @return int the value represented by the argument * @throws NumberFormatException if the argument could not be parsed as an int quantity. */ public static int parseInt(byte[] bytes, int start, int length) { return parseInt(bytes, start, length, 10); }
/** * Parses the byte buffer argument as if it was an int value and returns the * result. Throws NumberFormatException if the byte array does not represent an * int quantity. * * @return int the value represented by the argument * @throws NumberFormatException if the argument could not be parsed as an int quantity. */ public static int parseInt(ByteBuf bytes) { return parseInt(bytes, bytes.readerIndex(), bytes.readableBytes()); }
/** * Parses the byte buffer argument as if it was an int value and returns the * result. Throws NumberFormatException if the byte array does not represent an * int quantity. * * @return int the value represented by the argument * @throws NumberFormatException if the argument could not be parsed as an int quantity. */ public static int parseInt(ByteBuf bytes) { return parseInt(bytes, bytes.readerIndex(), bytes.readableBytes()); }
return parseInt(bytes.array(), start, length);
return parseInt(bytes.array(), start, length);
case INT2: datum = bytes == null || bytes.length == 0 ? NullDatum.get() : DatumFactory.createInt2((short)NumberUtil.parseInt(bytes, 0, bytes.length)); break; case INT4: datum = bytes == null || bytes.length == 0 ? NullDatum.get() : DatumFactory.createInt4(NumberUtil.parseInt(bytes, 0, bytes.length)); break; case INT8:
case INT2: datum = bytes == null || bytes.length == 0 ? NullDatum.get() : DatumFactory.createInt2((short)NumberUtil.parseInt(bytes, 0, bytes.length)); break; case INT4: datum = bytes == null || bytes.length == 0 ? NullDatum.get() : DatumFactory.createInt4(NumberUtil.parseInt(bytes, 0, bytes.length)); break; case INT8:
case INT2: datum = isNull(bytes, offset, length, nullCharacters) ? NullDatum.get() : DatumFactory.createInt2((short) NumberUtil.parseInt(bytes, offset, length)); break; case INT4: datum = isNull(bytes, offset, length, nullCharacters) ? NullDatum.get() : DatumFactory.createInt4(NumberUtil.parseInt(bytes, offset, length)); break; case INT8:
case INT2: datum = isNull(bytes, offset, length, nullCharacters) ? NullDatum.get() : DatumFactory.createInt2((short) NumberUtil.parseInt(bytes, offset, length)); break; case INT4: datum = isNull(bytes, offset, length, nullCharacters) ? NullDatum.get() : DatumFactory.createInt4(NumberUtil.parseInt(bytes, offset, length)); break; case INT8:
case INT2: datum = isNull(bytes, offset, length, nullCharacters) ? NullDatum.get() : DatumFactory.createInt2((short) NumberUtil.parseInt(bytes, offset, length)); break; case INT4: datum = isNull(bytes, offset, length, nullCharacters) ? NullDatum.get() : DatumFactory.createInt4(NumberUtil.parseInt(bytes, offset, length)); break; case INT8: