private static void write ( DocFile outFile , OutputStream out , byte [ ] buf , int len ) throws DocFileIOException { try { out . write ( buf , 0 , len ) ; } catch ( IOException e ) { throw new DocFileIOException ( outFile , DocFileIOException . Mode . WRITE , e ) ; } }
Writes to an output stream for a given file from a given buffer . If an IOException occurs it is wrapped in a DocFileIOException .