code: protected synchronized void writePages(OggPage[] pages) throws IOException {
          for(OggPage page : pages) {
              page.writeHeader( out );
              out.write( page.getData() );
          }
          out.flush();
      }
docs: Writes a (possibly series) of pages to the
  stream in one go.