public static void copy(byte[] in,OutputStream out) throws IOException {
  Assert.notNull(in,"No input byte array specified");
  Assert.notNull(out,"No OutputStream specified");
  try {
    out.write(in);
  }
  finally {
    try {
      out.close();
    }
 catch (    IOException ex) {
    }
  }
}

public static void copy ( byte [ ] in , OutputStream out ) throws IOException { Assert . notNull ( in , "No input byte array specified" ) ; Assert . notNull ( out , "No OutputStream specified" ) ; try { out . write ( in ) ; } finally { try { out . close ( ) ; } catch ( IOException ex ) { } } }
copy the contents of the given byte array to the given outputstream . closes the stream when done .
