Skip to content

Commit 703136e

Browse files
committed
PDFBOX-5660: improve javadoc; closes #198
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1922631 13f79535-47bb-0310-9956-ffa450edef68
1 parent 187a3a0 commit 703136e

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

pdfbox/src/main/java/org/apache/pdfbox/Loader.java

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,8 @@ public static PDDocument loadPDF(File file, String password, InputStream keyStor
365365
/**
366366
* Parses a PDF. Unrestricted main memory will be used for buffering PDF new streams.
367367
*
368-
* @param randomAccessRead random access read representing the pdf to be loaded
368+
* @param randomAccessRead random access read representing the pdf to be loaded. To pass an
369+
* InputStream, wrap it into a {@link RandomAccessReadBuffer}.
369370
*
370371
* @return loaded document
371372
*
@@ -380,7 +381,8 @@ public static PDDocument loadPDF(RandomAccessRead randomAccessRead) throws IOExc
380381
/**
381382
* Parses a PDF.
382383
*
383-
* @param randomAccessRead random access read representing the pdf to be loaded
384+
* @param randomAccessRead random access read representing the pdf to be loaded. To pass an
385+
* InputStream, wrap it into a {@link RandomAccessReadBuffer}.
384386
* @param streamCacheCreateFunction a function to create an instance of a stream cache to be used for buffering
385387
* new/altered PDF streams
386388
*
@@ -399,7 +401,8 @@ public static PDDocument loadPDF(RandomAccessRead randomAccessRead,
399401
/**
400402
* Parses a PDF. Unrestricted main memory will be used for buffering new/altered PDF streams.
401403
*
402-
* @param randomAccessRead random access read representing the pdf to be loaded
404+
* @param randomAccessRead random access read representing the pdf to be loaded. To pass an
405+
* InputStream, wrap it into a {@link RandomAccessReadBuffer}.
403406
* @param password password to be used for decryption
404407
*
405408
* @return loaded document
@@ -416,7 +419,8 @@ public static PDDocument loadPDF(RandomAccessRead randomAccessRead, String passw
416419
/**
417420
* Parses a PDF. Unrestricted main memory will be used for buffering new/altered PDF streams.
418421
*
419-
* @param randomAccessRead random access read representing the pdf to be loaded
422+
* @param randomAccessRead random access read representing the pdf to be loaded. To pass an
423+
* InputStream, wrap it into a {@link RandomAccessReadBuffer}.
420424
* @param password password to be used for decryption
421425
* @param keyStore key store to be used for decryption when using public key security
422426
* @param alias alias to be used for decryption when using public key security
@@ -435,7 +439,8 @@ public static PDDocument loadPDF(RandomAccessRead randomAccessRead, String passw
435439
/**
436440
* Parses a PDF.
437441
*
438-
* @param randomAccessRead random access read representing the pdf to be loaded
442+
* @param randomAccessRead random access read representing the pdf to be loaded. To pass an
443+
* InputStream, wrap it into a {@link RandomAccessReadBuffer}.
439444
* @param password password to be used for decryption
440445
* @param streamCacheCreateFunction a function to create an instance of a stream cache to be used for buffering
441446
* new/altered PDF streams
@@ -454,7 +459,8 @@ public static PDDocument loadPDF(RandomAccessRead randomAccessRead, String passw
454459
/**
455460
* Parses a PDF.
456461
*
457-
* @param randomAccessRead random access read representing the pdf to be loaded
462+
* @param randomAccessRead random access read representing the pdf to be loaded. To pass an
463+
* InputStream, wrap it into a {@link RandomAccessReadBuffer}.
458464
* @param password password to be used for decryption
459465
* @param keyStore key store to be used for decryption when using public key security
460466
* @param alias alias to be used for decryption when using public key security

pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFMergerUtility.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
import org.apache.pdfbox.cos.COSStream;
4444
import org.apache.pdfbox.io.IOUtils;
4545
import org.apache.pdfbox.io.RandomAccessRead;
46+
import org.apache.pdfbox.io.RandomAccessReadBuffer;
4647
import org.apache.pdfbox.io.RandomAccessStreamCache.StreamCacheCreateFunction;
4748
import org.apache.pdfbox.pdfwriter.compress.CompressParameters;
4849
import org.apache.pdfbox.pdmodel.PDDocument;
@@ -310,7 +311,8 @@ public void addSource(File source) throws FileNotFoundException
310311
/**
311312
* Add a source to the list of documents to merge.
312313
*
313-
* @param source RandomAccessRead representing source document
314+
* @param source RandomAccessRead representing source document. To pass an InputStream, wrap it
315+
* into a {@link RandomAccessReadBuffer}.
314316
*/
315317
public void addSource(RandomAccessRead source)
316318
{

0 commit comments

Comments
 (0)