Index: pdfbox/src/main/java/org/apache/pdfbox/io/PushBackInputStream.java
===================================================================
--- pdfbox/src/main/java/org/apache/pdfbox/io/PushBackInputStream.java	(revision 1612801)
+++ pdfbox/src/main/java/org/apache/pdfbox/io/PushBackInputStream.java	(working copy)
@@ -35,7 +35,7 @@
     
     /** In case provided input stream implements {@link RandomAccessRead} we hold
      *  a typed reference to it in order to support seek operations. */
-    private final RandomAccessRead raInput;
+    private final InputStream raInput;
     
     /**
      * Constructor.
@@ -53,8 +53,7 @@
             throw new IOException( "Error: input was null" );
         }
         
-        raInput = ( input instanceof RandomAccessRead ) ?
-										(RandomAccessRead) input : null;
+        raInput = input;
     }
 
     /**
@@ -219,18 +218,15 @@
      */
     public void seek( long newOffset ) throws IOException
     {
-    	if ( raInput == null )
-    			throw new IOException( "Provided stream of type " + in.getClass().getSimpleName() +
-    													 	 " is not seekable." );
-    	
     	// clear unread buffer by skipping over all bytes of buffer
     	int unreadLength = buf.length - pos;
     	if ( unreadLength > 0 )
     	{
     			skip( unreadLength );
     	}
-    	
-    	raInput.seek( newOffset );
+
+        raInput.reset();
+        raInput.skip(newOffset);
     	offset = newOffset;
     }
 
Index: pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java
===================================================================
--- pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java	(revision 1612801)
+++ pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java	(working copy)
@@ -106,9 +106,8 @@
      */
     protected static final char[] OBJ_MARKER = new char[] { 'o', 'b', 'j' };
 
-    private final File pdfFile;
     private long fileLen;
-    private final RandomAccessBufferedFileInputStream raStream;
+    private final byte[] raStream;
 
     /**
      * is parser using auto healing capacity ?
@@ -141,13 +140,6 @@
 
     private static final Log LOG = LogFactory.getLog(NonSequentialPDFParser.class);
 
-    /**
-     * <code>true</code> if the NonSequentialPDFParser is initialized by a
-     * InputStream, in this case a temporary file is created. At the end of the
-     * {@linkplain #parse()} method,the temporary file will be deleted.
-     */
-    private boolean isTmpPDFFile = false;
-
     public static final String TMP_FILE_PREFIX = "tmpPDF";
 
     // ------------------------------------------------------------------------
@@ -208,12 +200,11 @@
     public NonSequentialPDFParser(File file, RandomAccess raBuf, String decryptionPassword) throws IOException
     {
         super(EMPTY_INPUT_STREAM, null, false);
-        pdfFile = file;
-        raStream = new RandomAccessBufferedFileInputStream(pdfFile);
-        init(file, raBuf, decryptionPassword);
+        raStream = IOUtils.toByteArray(new RandomAccessBufferedFileInputStream(file));
+        init(raBuf, decryptionPassword);
     }
 
-    private void init(File file, RandomAccess raBuf, String decryptionPassword) throws IOException
+    private void init(RandomAccess raBuf, String decryptionPassword) throws IOException
     {
         String eofLookupRangeStr = System.getProperty(SYSPROP_EOFLOOKUPRANGE);
         if (eofLookupRangeStr != null)
@@ -231,7 +222,7 @@
 
         setDocument((raBuf == null) ? new COSDocument(new RandomAccessBuffer(), false) : new COSDocument(raBuf, false));
 
-        pdfSource = new PushBackInputStream(raStream, 4096);
+        pdfSource = new PushBackInputStream(new ByteArrayInputStream(raStream), 4096);
 
         password = decryptionPassword;
     }
@@ -258,39 +249,10 @@
     public NonSequentialPDFParser(InputStream input, RandomAccess raBuf, String decryptionPassword) throws IOException
     {
         super(EMPTY_INPUT_STREAM, null, false);
-        pdfFile = createTmpFile(input);
-        raStream = new RandomAccessBufferedFileInputStream(pdfFile);
-        init(pdfFile, raBuf, decryptionPassword);
+        raStream = IOUtils.toByteArray(input);
+        init(raBuf, decryptionPassword);
     }
 
-    /**
-     * Create a temporary file with the input stream. If the creation succeed,
-     * the {@linkplain #isTmpPDFFile} is set to true. This Temporary file will
-     * be deleted at end of the parse method
-     * 
-     * @param input
-     * @return the temporary file
-     * @throws IOException If something went wrong.
-     */
-    private File createTmpFile(InputStream input) throws IOException
-    {
-        File tmpFile = null;
-        FileOutputStream fos = null;
-        try
-        {
-            tmpFile = File.createTempFile(TMP_FILE_PREFIX, ".pdf");
-            fos = new FileOutputStream(tmpFile);
-            IOUtils.copy(input, fos);
-            isTmpPDFFile = true;
-            return tmpFile;
-        }
-        finally
-        {
-            IOUtils.closeQuietly(input);
-            IOUtils.closeQuietly(fos);
-        }
-    }
-
     // ------------------------------------------------------------------------
     /**
      * Sets how many trailing bytes of PDF file are searched for EOF marker and
@@ -442,7 +404,7 @@
                 AccessPermission permission = securityHandler.getCurrentAccessPermission();
                 if (!permission.canExtractContent())
                 {
-                    LOG.warn("PDF file '" + pdfFile.getPath() + "' does not allow extracting content.");
+                    LOG.warn("PDF file does not allow extracting content.");
                 }
 
             }
@@ -580,12 +542,12 @@
         long skipBytes;
 
         // ---- read trailing bytes into buffer
-        fileLen = pdfFile.length();
+        fileLen = raStream.length;
 
-        FileInputStream fIn = null;
+        InputStream fIn = null;
         try
         {
-            fIn = new FileInputStream(pdfFile);
+            fIn = new ByteArrayInputStream(raStream);
 
             final int trailByteCount = (fileLen < readTrailBytes) ? (int) fileLen : readTrailBytes;
             buf = new byte[trailByteCount];
@@ -781,8 +743,6 @@
             {
             }
 
-            deleteTempFile();
-
             if (exceptionOccurred && (document != null))
             {
                 try
@@ -802,9 +762,9 @@
      * 
      * @return the pdf file
      */
-    protected File getPdfFile()
+    protected InputStream getPdfFile()
     {
-        return this.pdfFile;
+        return new ByteArrayInputStream(raStream);
     }
 
     /**
@@ -831,27 +791,6 @@
         }
         this.isLenient = lenient;
     }
-    /**
-     * Remove the temporary file. A temporary file is created if this class is
-     * instantiated with an InputStream
-     */
-    protected void deleteTempFile()
-    {
-        if (isTmpPDFFile)
-        {
-            try
-            {
-                if (!pdfFile.delete())
-                {
-                    LOG.warn("Temporary file '" + pdfFile.getName() + "' can't be deleted");
-                }
-            }
-            catch (SecurityException e)
-            {
-                LOG.warn("Temporary file '" + pdfFile.getName() + "' can't be deleted", e);
-            }
-        }
-    }
 
     // ------------------------------------------------------------------------
     /**
Index: preflight/src/main/java/org/apache/pdfbox/preflight/parser/PreflightParser.java
===================================================================
--- preflight/src/main/java/org/apache/pdfbox/preflight/parser/PreflightParser.java	(revision 1612801)
+++ preflight/src/main/java/org/apache/pdfbox/preflight/parser/PreflightParser.java	(working copy)
@@ -276,7 +276,7 @@
         BufferedReader reader = null;
         try
         {
-            reader = new BufferedReader(new InputStreamReader(new FileInputStream(getPdfFile()), encoding));
+            reader = new BufferedReader(new InputStreamReader(getPdfFile(), encoding));
             String firstLine = reader.readLine();
             if (firstLine == null || (firstLine != null && !firstLine.matches("%PDF-1\\.[1-9]")))
             {
