public static WriterCallback from ( final byte [ ] data ) { return new WriterCallback ( ) { @ Override public void write ( OutputStream os ) throws IOException { os . write ( data ) ; } } ; }
Creates a writer callback that writes some byte array to the target stream .