Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ public JsonBinary(byte[] bytes) {

public JsonBinary(ByteArrayInputStream contents) {
this.reader = contents;
this.reader.mark(Integer.MAX_VALUE);
}

public String getString() {
Expand Down Expand Up @@ -397,6 +398,8 @@ protected void parseObject(boolean small, JsonFormatter formatter)
}
} else {
// Parse the value ...
this.reader.reset();
this.reader.skip(entry.index + 1);
parse(entry.type, formatter);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,4 +218,18 @@ public void skipToTheEndOfTheBlock() throws IOException {
}
}

@Override
public synchronized void mark(int readlimit) {
inputStream.mark(readlimit);
}

@Override
public boolean markSupported() {
return inputStream.markSupported();
}

@Override
public synchronized void reset() throws IOException {
inputStream.reset();
}
}