Exemplo n.º 1
0
 /// <summary>
 /// Writes the header to the OutputStreamCounter.
 /// @throws IOException
 /// </summary>
 public void WriteHeader(OutputStreamCounter os)
 {
     if (Appendmode)
     {
         os.Write(Header[0], 0, Header[0].Length);
     }
     else
     {
         os.Write(Header[1], 0, Header[1].Length);
         os.Write(GetVersionAsByteArray(HeaderVersion), 0, GetVersionAsByteArray(HeaderVersion).Length);
         os.Write(Header[2], 0, Header[2].Length);
         HeaderWasWritten = true;
     }
 }
Exemplo n.º 2
0
 /**
  * Writes the header to the OutputStreamCounter.
  * @throws IOException
  */
 public void WriteHeader(OutputStreamCounter os)
 {
     if (appendmode)
     {
         os.Write(HEADER[0], 0, HEADER[0].Length);
     }
     else
     {
         os.Write(HEADER[1], 0, HEADER[1].Length);
         os.Write(GetVersionAsByteArray(header_version), 0, GetVersionAsByteArray(header_version).Length);
         os.Write(HEADER[2], 0, HEADER[2].Length);
         headerWasWritten = true;
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Constructs a DocWriter.
 /// </summary>
 /// <param name="document">The Document that has to be written</param>
 /// <param name="os">The Stream the writer has to write to.</param>
 protected DocWriter(Document document, Stream os)
 {
     this.document = document;
     this.os       = new OutputStreamCounter(os);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Constructs a DocWriter.
 /// </summary>
 /// <param name="document">The Document that has to be written</param>
 /// <param name="os">The Stream the writer has to write to.</param>
 protected DocWriter(Document document, Stream os)
 {
     Document = document;
     Os       = new OutputStreamCounter(os);
 }