protected byte[] loadBytes(InputStream is) throws IOException {
  BufferedInputStream bufInputStream=new BufferedInputStream(is,8192);
  ByteArrayOutputStream byteOutStream=new ByteArrayOutputStream();
  int c;
  int bufferSize=8192;
  byte[] buffer=new byte[bufferSize];
  while ((c=bufInputStream.read(buffer)) != -1) {
    byteOutStream.write(buffer,0,c);
  }
  return byteOutStream.toByteArray();
}

protected byte [ ] loadBytes ( InputStream is ) throws IOException { BufferedInputStream bufInputStream = new BufferedInputStream ( is , 8192 ) ; ByteArrayOutputStream byteOutStream = new ByteArrayOutputStream ( ) ; int c ; int bufferSize = 8192 ; byte [ ] buffer = new byte [ bufferSize ] ; while ( ( c = bufInputStream . read ( buffer ) ) != - 1 ) { byteOutStream . write ( buffer , 0 , c ) ; } return byteOutStream . toByteArray ( ) ; }
reads jar file contents from stream
