File: 01_allow_standard_input.diff

package info (click to toggle)
libitext-java 2.1.7-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 8,844 kB
  • ctags: 14,396
  • sloc: java: 94,085; xml: 845; makefile: 38
file content (26 lines) | stat: -rw-r--r-- 1,204 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- libitext-java-2.1.7.orig/core/com/lowagie/text/pdf/RandomAccessFileOrArray.java
+++ libitext-java-2.1.7/core/com/lowagie/text/pdf/RandomAccessFileOrArray.java
@@ -99,7 +99,11 @@ public class RandomAccessFileOrArray imp
                 }
             }
             else {
-                InputStream is = BaseFont.getResourceStream(filename);
+                InputStream is;
+                if( filename.equals("-"))
+                    is = System.in;
+                else
+                    is = BaseFont.getResourceStream(filename);
                 if (is == null)
                     throw new IOException(filename + " not found as file or resource.");
                 try {