lengthEntry = refLength;
} else {
encodedStream = encodeStream();
- lengthEntry = Integer.valueOf(encodedStream.getSize() + 1);
+ lengthEntry = encodedStream.getSize();
}
populateStreamDict(lengthEntry);
expected.append(" /Type /ObjStm\n")
.append(" /N ").append(numObs).append("\n")
.append(" /First ").append(offsetsLength).append('\n')
- .append(" /Length ").append(OBJECT_CONTENT.length() * 2 + offsetsLength + 1).append('\n')
+ .append(" /Length ").append(OBJECT_CONTENT.length() * 2 + offsetsLength).append('\n')
.append(">>\n")
.append("stream\n");
int offset = 0;
.append(" /Type /XRef\n")
.append(" /Size ").append(Integer.toString(maxObjectNumber + 1)).append('\n')
.append(" /W [1 8 2]\n")
- .append(" /Length ").append(Integer.toString((maxObjectNumber + 1) * 11 + 1)).append('\n')
+ .append(" /Length ").append(Integer.toString((maxObjectNumber + 1) * 11)).append('\n')
.append(">>\n")
.append("stream\n");
stream.write(getBytes(expected));