diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2016-08-15 19:17:39 +0800 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2016-08-15 19:17:39 +0800 |
commit | 83d88f1952047d9d99960cc2702b515782744dfb (patch) | |
tree | 4c163b6706fdee3f93f976616273e69796e11c28 /platform/java/src/com/artifex | |
parent | 5e6e1793723b139a7ed702cf6dc48955fb27300e (diff) | |
download | mupdf-83d88f1952047d9d99960cc2702b515782744dfb.tar.xz |
JNI: BufferOutputStream should only be used for writing.
Diffstat (limited to 'platform/java/src/com/artifex')
-rw-r--r-- | platform/java/src/com/artifex/mupdf/fitz/BufferOutputStream.java | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/platform/java/src/com/artifex/mupdf/fitz/BufferOutputStream.java b/platform/java/src/com/artifex/mupdf/fitz/BufferOutputStream.java index ec87db0c..c802f417 100644 --- a/platform/java/src/com/artifex/mupdf/fitz/BufferOutputStream.java +++ b/platform/java/src/com/artifex/mupdf/fitz/BufferOutputStream.java @@ -26,41 +26,4 @@ public class BufferOutputStream extends OutputStream public void write(int b) { buffer.writeByte((byte) b); } - - public int available() { - return buffer.getLength(); - } - - public void mark(int readlimit) { - resetPosition = position; - } - - public boolean markSupported() { - return true; - } - - public int read() { - return buffer.readByte(position++); - } - - public int read(byte[] b) { - int n = buffer.readBytes(position, b); - position += n; - return n; - } - - public int read(byte[] b, int off, int len) { - int n = buffer.readBytesInto(position, b, off, len); - position += n; - return n; - } - - public void reset() throws IOException { - if (resetPosition < 0) - throw new IOException("cannot reset because mark never set"); - if (resetPosition >= buffer.getLength()) - throw new IOException("cannot reset because mark set outside of buffer"); - - position = resetPosition; - } } |