protected short readShort(byte[] content) throws IOException { short value = ByteUtils.convertShortFromBytes(content, index); index += 2; return value; }
public static short convertShortFromBytes(byte[] byteArray) { return convertShortFromBytes(byteArray, 0); }
/** * Read in a short from an InputStream * * @param inputStream * The InputStream used to read the short * @return A short, which is the next 2 bytes converted from the InputStream * @throws IOException * Thrown if there is a problem reading from the InputStream */ public static short readShort(InputStream inputStream) throws IOException { byte[] byteArray = new byte[2]; // Read in the next 2 bytes inputStream.read(byteArray); short number = convertShortFromBytes(byteArray); return number; }
protected short readShort(byte[] content) throws IOException { short value = ByteUtils.convertShortFromBytes(content, index); index += 2; return value; }
public static short convertShortFromBytes(byte[] byteArray) { return convertShortFromBytes(byteArray, 0); }
protected short readShort(byte[] content) throws IOException { short value = ByteUtils.convertShortFromBytes(content, index); index += 2; return value; }
public static short convertShortFromBytes(byte[] byteArray) { return convertShortFromBytes(byteArray, 0); }
/** * Read in a short from an InputStream * * @param inputStream * The InputStream used to read the short * @return A short, which is the next 2 bytes converted from the InputStream * @throws IOException * Thrown if there is a problem reading from the InputStream */ public static short readShort(InputStream inputStream) throws IOException { byte[] byteArray = new byte[2]; // Read in the next 2 bytes inputStream.read(byteArray); short number = convertShortFromBytes(byteArray); return number; }
/** * Read in a short from an InputStream * * @param inputStream * The InputStream used to read the short * @return A short, which is the next 2 bytes converted from the InputStream * @throws IOException * Thrown if there is a problem reading from the InputStream */ public static short readShort(InputStream inputStream) throws IOException { byte[] byteArray = new byte[2]; // Read in the next 2 bytes inputStream.read(byteArray); short number = convertShortFromBytes(byteArray); return number; }