public void decodeJBIG2(InputStream inputStream) throws IOException, JBIG2Exception {
  int availiable=inputStream.available();
  byte[] bytes=new byte[availiable];
  inputStream.read(bytes);
  decodeJBIG2(bytes);
}

public void decodeJBIG2 ( InputStream inputStream ) throws IOException , JBIG2Exception { int availiable = inputStream . available ( ) ; byte [ ] bytes = new byte [ availiable ] ; inputStream . read ( bytes ) ; decodeJBIG2 ( bytes ) ; }
decodes a jbig2 image from an inputstream
