Package org.apache.pdfbox.io

Examples of org.apache.pdfbox.io.RandomAccessBuffer


     * Constructor.  Uses memory to store stream.
     *
     *  @throws IOException If there is an error creating the tmp file.
     */
    public COSDocument() throws IOException {
        this(new RandomAccessBuffer(), false);
    }
View Full Code Here


     *
     *  @throws IOException If there is an error creating the tmp file.
     */
    public COSDocument() throws IOException
    {
        this(new RandomAccessBuffer(), false);
    }
View Full Code Here

          LOG.warn( "System property " + SYSPROP_EOFLOOKUPRANGE +
              " does not contain an integer value, but: '" + eofLookupRangeStr + "'" );
        }
      }

      setDocument( ( raBuf == null ) ? new COSDocument( new RandomAccessBuffer(), false ) new COSDocument( raBuf, false ) );

      pdfSource = new PushBackInputStream( raStream, 4096 );

      password = decryptionPassword;
    }
View Full Code Here

     *
     *  @throws IOException If there is an error creating the tmp file.
     */
    public COSDocument() throws IOException
    {
        this(new RandomAccessBuffer(), false);
    }
View Full Code Here

    private COSStream createContentStream(COSBase contents) throws IOException
    {
        List<COSStream> contentStreams = createContentStreamList(contents);
        // concatenate streams
        COSStream concatStream = new COSStream(new RandomAccessBuffer());
        OutputStream out = concatStream.createUnfilteredStream();
        for (COSStream contentStream : contentStreams)
        {
            InputStream in = contentStream.getUnfilteredStream();
            byte[] buf = new byte[2048];
View Full Code Here

                + " cm /" + xObjectId + " Do Q\nQ\n");
    }

    private COSStream createStream(String content) throws IOException
    {
        COSStream stream = new COSStream(new RandomAccessBuffer());
        OutputStream out = stream.createUnfilteredStream();
        out.write(content.getBytes("ISO-8859-1"));
        out.close();
        stream.setFilters(COSName.FLATE_DECODE);
        return stream;
View Full Code Here

    /**
     * Constructor.  Uses memory to store stream.
     */
    public COSDocument()
    {
        this(new RandomAccessBuffer(), false);
    }
View Full Code Here

                LOG.warn("System property " + SYSPROP_EOFLOOKUPRANGE + " does not contain an integer value, but: '"
                        + eofLookupRangeStr + "'");
            }
        }

        setDocument((raBuf == null) ? new COSDocument(new RandomAccessBuffer(), false) : new COSDocument(raBuf, false));

        pdfSource = new PushBackInputStream(raStream, 4096);

        password = decryptionPassword;
    }
View Full Code Here

        dict.setItem("Domain", domainArray);
        COSArray rangeArray = new COSArray();
        rangeArray.setFloatArray(range);
        dict.setItem("Range", rangeArray);

        COSStream functionStream = new COSStream(dict, new RandomAccessBuffer());
        OutputStream out = functionStream.createUnfilteredStream();
        byte[] data = function.getBytes("US-ASCII");
        out.write(data, 0, data.length);
        out.flush();
View Full Code Here

    /**
     * Create a fresh XRef stream like for a fresh file or an incremental update.
     */
    public PDFXRefStream()
    {
        this.stream = new COSStream(new COSDictionary(), new RandomAccessBuffer());
        streamData = new TreeMap<Integer, Object>();
        objectNumbers = new TreeSet<Integer>();
    }
View Full Code Here

TOP

Related Classes of org.apache.pdfbox.io.RandomAccessBuffer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.