protected boolean readBoolean(byte[] content) throws IOException { boolean value = ByteUtils.convertBooleanFromBytes(content, index); index += 1; return value; }
public static boolean convertBooleanFromBytes(byte[] byteArray) { return convertBooleanFromBytes(byteArray, 0); } public static boolean convertBooleanFromBytes(byte[] byteArray, int offset) {
/** * Read in a boolean from an InputStream * * @param inputStream * The InputStream used to read the boolean * @return A boolean, which is the next byte converted from the InputStream (iow, byte != 0) * @throws IOException * Thrown if there is a problem reading from the InputStream */ public static boolean readBoolean(InputStream inputStream) throws IOException { byte[] byteArray = new byte[1]; // Read in the next byte inputStream.read(byteArray); return convertBooleanFromBytes(byteArray); }
protected boolean readBoolean(byte[] content) throws IOException { boolean value = ByteUtils.convertBooleanFromBytes(content, index); index += 1; return value; }
protected boolean readBoolean(byte[] content) throws IOException { boolean value = ByteUtils.convertBooleanFromBytes(content, index); index += 1; return value; }
public static boolean convertBooleanFromBytes(byte[] byteArray) { return convertBooleanFromBytes(byteArray, 0); } public static boolean convertBooleanFromBytes(byte[] byteArray, int offset) {
public static boolean convertBooleanFromBytes(byte[] byteArray) { return convertBooleanFromBytes(byteArray, 0); } public static boolean convertBooleanFromBytes(byte[] byteArray, int offset) {
/** * Read in a boolean from an InputStream * * @param inputStream * The InputStream used to read the boolean * @return A boolean, which is the next byte converted from the InputStream (iow, byte != 0) * @throws IOException * Thrown if there is a problem reading from the InputStream */ public static boolean readBoolean(InputStream inputStream) throws IOException { byte[] byteArray = new byte[1]; // Read in the next byte inputStream.read(byteArray); return convertBooleanFromBytes(byteArray); }
/** * Read in a boolean from an InputStream * * @param inputStream * The InputStream used to read the boolean * @return A boolean, which is the next byte converted from the InputStream (iow, byte != 0) * @throws IOException * Thrown if there is a problem reading from the InputStream */ public static boolean readBoolean(InputStream inputStream) throws IOException { byte[] byteArray = new byte[1]; // Read in the next byte inputStream.read(byteArray); return convertBooleanFromBytes(byteArray); }