public void fromByteArray(byte data[]) throws DataFormatException { if (data == null) throw new DataFormatException("Null data passed in"); try { ByteArrayInputStream bais = new ByteArrayInputStream(data); readBytes(bais); } catch (IOException ioe) { throw new DataFormatException("Error reading the byte array", ioe); } }