File tree Expand file tree Collapse file tree 2 files changed +0
-46
lines changed
pdfbox/src/main/java/org/apache/pdfbox/pdfparser Expand file tree Collapse file tree 2 files changed +0
-46
lines changed Original file line number Diff line number Diff line change @@ -1104,51 +1104,6 @@ protected void readExpectedChar(char ec) throws IOException
11041104 "expected='" + ec + "' actual='" + c + "' at offset " + source .getPosition ());
11051105 }
11061106 }
1107-
1108- /**
1109- * This will read the next string from the stream up to a certain length.
1110- *
1111- * @param length The length to stop reading at.
1112- *
1113- * @return The string that was read from the stream of length 0 to length.
1114- *
1115- * @throws IOException If there is an error reading from the stream.
1116- */
1117- protected String readString ( int length ) throws IOException
1118- {
1119- skipSpaces ();
1120-
1121- int c = source .read ();
1122-
1123- //average string size is around 2 and the normal string buffer size is
1124- //about 16 so lets save some space.
1125- StringBuilder buffer = new StringBuilder (length );
1126- while ( !isWhitespace (c ) && !isClosing (c ) && c != -1 && buffer .length () < length &&
1127- c != '[' &&
1128- c != '<' &&
1129- c != '(' &&
1130- c != '/' )
1131- {
1132- buffer .append ( (char )c );
1133- c = source .read ();
1134- }
1135- if (c != -1 )
1136- {
1137- source .rewind (1 );
1138- }
1139- return buffer .toString ();
1140- }
1141-
1142- /**
1143- * This will tell if the next character is a closing brace( close of PDF array ).
1144- *
1145- * @param c The character to check against end of line
1146- * @return true if the next byte is ']', false otherwise.
1147- */
1148- protected static boolean isClosing (int c )
1149- {
1150- return c == ']' ;
1151- }
11521107
11531108 /**
11541109 * This will read bytes until the first end of line marker occurs.
Original file line number Diff line number Diff line change @@ -428,7 +428,6 @@ private String readOperator() throws IOException
428428 while (
429429 nextChar != -1 && // EOF
430430 !isWhitespace (nextChar ) &&
431- !isClosing (nextChar ) &&
432431 nextChar != '[' &&
433432 nextChar != '<' &&
434433 nextChar != '(' &&
You can’t perform that action at this time.
0 commit comments