Skip to content

Commit

Permalink
Merge pull request #597 from veraPDF/base_parser
Browse files Browse the repository at this point in the history
Add BaseParser and BaseParserInputStream
  • Loading branch information
MaximPlusov authored Oct 27, 2023
2 parents 6d379bb + cdebea7 commit 94d455d
Show file tree
Hide file tree
Showing 13 changed files with 656 additions and 999 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.verapdf.as.filters.ASInFilter;
import org.verapdf.as.io.ASInputStream;
import org.verapdf.as.io.ASMemoryInStream;
import org.verapdf.parser.BaseParserInputStream;
import org.verapdf.parser.NotSeekableBaseParser;

import java.io.IOException;
Expand All @@ -41,7 +42,7 @@
*
* @author Sergey Shemyakov
*/
public class ASBufferedInFilter extends ASInFilter {
public class ASBufferedInFilter extends ASInFilter implements BaseParserInputStream {

public static final int START_BUFFER_SIZE = 10240;
public static final int BF_BUFFER_SIZE = 2048;
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/verapdf/io/SeekableInputStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.verapdf.as.io.ASInputStream;
import org.verapdf.as.io.ASMemoryInStream;
import org.verapdf.exceptions.VeraPDFParserException;
import org.verapdf.parser.BaseParserInputStream;

import java.io.IOException;
import java.io.InputStream;
Expand All @@ -35,7 +36,7 @@
*
* @author Sergey Shemyakov
*/
public abstract class SeekableInputStream extends ASInputStream {
public abstract class SeekableInputStream extends ASInputStream implements BaseParserInputStream {

private static final int MAX_BUFFER_SIZE = 10240;

Expand Down
Loading

0 comments on commit 94d455d

Please sign in to comment.