PDFBOX-1490: extend the buffer if the last byte was written to the last chunk

git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1432658 13f79535-47bb-0310-9956-ffa450edef68