Examples of RandomAccessSourceFactory


Examples of com.itextpdf.text.io.RandomAccessSourceFactory

     * @return the underlying source
     * @throws IOException
     */
    private RandomAccessSource getUnderlyingSource() throws IOException {
      //TODO: get rid of separate byte[] and RandomAccessFile objects and just store a RandomAccessSource
      RandomAccessSourceFactory fac = new RandomAccessSourceFactory();
      return raf == null ? fac.createSource(bout) : fac.createSource(raf);
    }
View Full Code Here

Examples of com.itextpdf.text.io.RandomAccessSourceFactory

        return true;
    }
   
    public static long[] checkObjectStart(byte line[]) {
        try {
            PRTokeniser tk = new PRTokeniser(new RandomAccessFileOrArray(new RandomAccessSourceFactory().createSource(line)));
            int num = 0;
            int gen = 0;
            if (!tk.nextToken() || tk.getTokenType() != TokenType.NUMBER)
                return null;
            num = tk.intValue();
View Full Code Here

Examples of com.itextpdf.text.io.RandomAccessSourceFactory

     * @param partial indicates if the reader needs to read the document only partially
     * @throws IOException on error
     */
    public PdfReader(final String filename, final byte ownerPassword[], boolean partial) throws IOException {
        this(
            new RandomAccessSourceFactory()
          .setForceRead(false)
          .setUsePlainRandomAccess(Document.plainRandomAccess)
          .createBestSource(filename),
          partial,
          ownerPassword,
View Full Code Here

Examples of com.itextpdf.text.io.RandomAccessSourceFactory

     * @param ownerPassword the password to read the document
     * @throws IOException on error
     */
    public PdfReader(final byte pdfIn[], final byte ownerPassword[]) throws IOException {
        this(
            new RandomAccessSourceFactory().createSource(pdfIn),
          false,
          ownerPassword,
          null,
          null,
          null,
View Full Code Here

Examples of com.itextpdf.text.io.RandomAccessSourceFactory

     * @param certificateKeyProvider the security provider for certificateKey
     * @throws IOException on error
     */
    public PdfReader(final String filename, final Certificate certificate, final Key certificateKey, final String certificateKeyProvider) throws IOException {
        this(
            new RandomAccessSourceFactory()
          .setForceRead(false)
          .setUsePlainRandomAccess(Document.plainRandomAccess)
          .createBestSource(filename),
          false,
          null,
View Full Code Here

Examples of com.itextpdf.text.io.RandomAccessSourceFactory

     * @param externalDecryptionProcess
     * @throws IOException on error
     */
    public PdfReader(final String filename, final ExternalDecryptionProcess externalDecryptionProcess) throws IOException {
        this(
                new RandomAccessSourceFactory()
                        .setForceRead(false)
                        .setUsePlainRandomAccess(Document.plainRandomAccess)
                        .createBestSource(filename),
                false,
                null,
View Full Code Here

Examples of com.itextpdf.text.io.RandomAccessSourceFactory

     * @param ownerPassword the password to read the document
     * @throws IOException on error
     */
    public PdfReader(final URL url, final byte ownerPassword[]) throws IOException {
        this(
            new RandomAccessSourceFactory().createSource(url),
          false,
          ownerPassword,
          null,
          null,
          null,
View Full Code Here

Examples of com.itextpdf.text.io.RandomAccessSourceFactory

     * @param ownerPassword the password to read the document
     * @throws IOException on error
     */
    public PdfReader(final InputStream is, final byte ownerPassword[]) throws IOException {
        this(
            new RandomAccessSourceFactory().createSource(is),
          false,
          ownerPassword,
          null,
          null,
          null,
View Full Code Here

Examples of com.itextpdf.text.io.RandomAccessSourceFactory

    protected PdfObject readOneObjStm(final PRStream stream, int idx) throws IOException {
        int first = stream.getAsNumber(PdfName.FIRST).intValue();
        byte b[] = getStreamBytes(stream, tokens.getFile());
        PRTokeniser saveTokens = tokens;
        tokens = new PRTokeniser(new RandomAccessFileOrArray(new RandomAccessSourceFactory().createSource(b)));
        try {
            int address = 0;
            boolean ok = true;
            ++idx;
            for (int k = 0; k < idx; ++k) {
View Full Code Here

Examples of com.itextpdf.text.io.RandomAccessSourceFactory

        if (stream == null) return;
        int first = stream.getAsNumber(PdfName.FIRST).intValue();
        int n = stream.getAsNumber(PdfName.N).intValue();
        byte b[] = getStreamBytes(stream, tokens.getFile());
        PRTokeniser saveTokens = tokens;
        tokens = new PRTokeniser(new RandomAccessFileOrArray(new RandomAccessSourceFactory().createSource(b)));
        try {
            int address[] = new int[n];
            int objNumber[] = new int[n];
            boolean ok = true;
            for (int k = 0; k < n; ++k) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.