Skip to content

Commit

Permalink
Allow to read from stdin.
Browse files Browse the repository at this point in the history
  • Loading branch information
albfernandez committed Nov 20, 2017
1 parent de5637c commit ed44987
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,13 @@ public RandomAccessFileOrArray(String filename, boolean forceRead, boolean plain
}
}
else {
InputStream is = BaseFont.getResourceStream(filename);
InputStream is = null;
if ("-".equals(filename)) {
is = System.in;
}
else {
is = BaseFont.getResourceStream(filename);
}
if (is == null)
throw new IOException(MessageLocalization.getComposedMessage("1.not.found.as.file.or.resource", filename));
try {
Expand Down

0 comments on commit ed44987

Please sign in to comment.