public static long convertLongFromBytes(byte[] bytes) { return convertLongFromBytes(bytes, 0); }
public static double convertDoubleFromBytes(byte[] bytes, int offset) { // Convert it to a double long bits = convertLongFromBytes(bytes, offset); return Double.longBitsToDouble(bits); }
/** * Read in a long from an InputStream * * @param inputStream * The InputStream used to read the long * @return A long, which is the next 8 bytes converted from the InputStream * @throws IOException * Thrown if there is a problem reading from the InputStream */ public static long readLong(InputStream inputStream) throws IOException { byte[] byteArray = new byte[8]; // Read in the next 8 bytes inputStream.read(byteArray); long number = convertLongFromBytes(byteArray); return number; }
protected long readLong(byte[] content) throws IOException { byte[] bytes = inflateFrom(content, index); index += 1 + bytes.length; bytes = ByteUtils.rightAlignBytes(bytes, 8); long value = ByteUtils.convertLongFromBytes(bytes); return value; }
public static long convertLongFromBytes(byte[] bytes) { return convertLongFromBytes(bytes, 0); }
public static long convertLongFromBytes(byte[] bytes) { return convertLongFromBytes(bytes, 0); }
public static double convertDoubleFromBytes(byte[] bytes, int offset) { // Convert it to a double long bits = convertLongFromBytes(bytes, offset); return Double.longBitsToDouble(bits); }
public static double convertDoubleFromBytes(byte[] bytes, int offset) { // Convert it to a double long bits = convertLongFromBytes(bytes, offset); return Double.longBitsToDouble(bits); }
/** * Read in a long from an InputStream * * @param inputStream * The InputStream used to read the long * @return A long, which is the next 8 bytes converted from the InputStream * @throws IOException * Thrown if there is a problem reading from the InputStream */ public static long readLong(InputStream inputStream) throws IOException { byte[] byteArray = new byte[8]; // Read in the next 8 bytes inputStream.read(byteArray); long number = convertLongFromBytes(byteArray); return number; }
/** * Read in a long from an InputStream * * @param inputStream * The InputStream used to read the long * @return A long, which is the next 8 bytes converted from the InputStream * @throws IOException * Thrown if there is a problem reading from the InputStream */ public static long readLong(InputStream inputStream) throws IOException { byte[] byteArray = new byte[8]; // Read in the next 8 bytes inputStream.read(byteArray); long number = convertLongFromBytes(byteArray); return number; }
protected long readLong(byte[] content) throws IOException { byte[] bytes = inflateFrom(content, index); index += 1 + bytes.length; bytes = ByteUtils.rightAlignBytes(bytes, 8); long value = ByteUtils.convertLongFromBytes(bytes); return value; }
protected long readLong(byte[] content) throws IOException { byte[] bytes = inflateFrom(content, index); index += 1 + bytes.length; bytes = ByteUtils.rightAlignBytes(bytes, 8); long value = ByteUtils.convertLongFromBytes(bytes); return value; }