com.lowagie.text.pdf.OutputStreamCounter Java Examples

The following examples show how to use com.lowagie.text.pdf.OutputStreamCounter. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PdfVersionImp.java    From gcs with Mozilla Public License 2.0 5 votes vote down vote up
/**
 * Writes the header to the OutputStreamCounter.
 * @throws IOException 
 */
public void writeHeader(OutputStreamCounter os) throws IOException {
	if (appendmode) {
		os.write(HEADER[0]);
	}
	else {
		os.write(HEADER[1]);
		os.write(getVersionAsByteArray(header_version));
		os.write(HEADER[2]);
		headerWasWritten = true;
	}
}
 
Example #2
Source File: PdfVersionImp.java    From itext2 with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * Writes the header to the OutputStreamCounter.
 * @throws IOException 
 */
public void writeHeader(OutputStreamCounter os) throws IOException {
	if (appendmode) {
		os.write(HEADER[0]);
	}
	else {
		os.write(HEADER[1]);
		os.write(getVersionAsByteArray(header_version));
		os.write(HEADER[2]);
		headerWasWritten = true;
	}
}
 
Example #3
Source File: DocWriter.java    From gcs with Mozilla Public License 2.0 2 votes vote down vote up
/**
* Constructs a <CODE>DocWriter</CODE>.
*
* @param document  The <CODE>Document</CODE> that has to be written
* @param os  The <CODE>OutputStream</CODE> the writer has to write to.
*/

   protected DocWriter(Document document, OutputStream os)  {
       this.document = document;
       this.os = new OutputStreamCounter(new BufferedOutputStream(os));
   }
 
Example #4
Source File: DocWriter.java    From itext2 with GNU Lesser General Public License v3.0 2 votes vote down vote up
/**
* Constructs a <CODE>DocWriter</CODE>.
*
* @param document  The <CODE>Document</CODE> that has to be written
* @param os  The <CODE>OutputStream</CODE> the writer has to write to.
*/

   protected DocWriter(Document document, OutputStream os)  {
       this.document = document;
       this.os = new OutputStreamCounter(new BufferedOutputStream(os));
   }
 
Example #5
Source File: DocWriter.java    From MesquiteCore with GNU Lesser General Public License v3.0 2 votes vote down vote up
/**
* Constructs a <CODE>DocWriter</CODE>.
*
* @param document  The <CODE>Document</CODE> that has to be written
* @param os  The <CODE>OutputStream</CODE> the writer has to write to.
*/

   protected DocWriter(Document document, OutputStream os)  {
       this.document = document;
       this.os = new OutputStreamCounter(new BufferedOutputStream(os));
   }