private void skipPastAnyPrefixJunk(InputStream in) {
        if (!in.markSupported())
            return;
        try {
            final int scanLength = 2048;
            final String scanFor = "%PDF-1.";
            int scanForIndex = 0;
            boolean scanForWhiteSpace = false;
            in.mark(scanLength);
            for (int i = 0; i < scanLength; i++) {
                int data = in.read();
                if (data < 0) {
                    in.reset();
                    return;
                }
                if (scanForWhiteSpace) {
                    if (Parser.isWhitespace((char) data)) {
                        return;
                    }
                } else {
                    if (data == scanFor.charAt(scanForIndex)) {
                        scanForIndex++;
                        if (scanForIndex == scanFor.length()) {
                            // Now read until we find white space
                            scanForWhiteSpace = true;
                        }
                    } else
                        scanForIndex = 0;
                }
            }
            // Searched through scanLength number of bytes and didn't find it,
            //  so reset, in case it was never there to find
            in.reset();
        }
        catch (IOException e) {
            try {
                in.reset();
            }
            catch (IOException e2) {
            }
        }
    }