@Test public void decodingWithZeroBytesTest() { byte[] bytes = "z9Q+r_D#".getBytes(); String expectedResult = new String(new byte[]{0,0,0,0,(byte)'L',(byte)'o',(byte)'r',(byte)'e',(byte)'m'}); ASCII85DecodeFilter filter = new ASCII85DecodeFilter(); String decoded = new String(filter.decode(bytes, null, null, new PdfDictionary())); Assert.assertEquals(expectedResult, decoded); }
@Override public byte[] decode(byte[] b, PdfName filterName, PdfObject decodeParams, PdfDictionary streamDictionary) { ByteArrayOutputStream outputStream = enableMemoryLimitsAwareHandler(streamDictionary); b = ASCII85DecodeInternal(b, outputStream); return b; }
ASCII85DecodeFilter extends MemoryLimitsAwareFilter { @Override public byte[] decode(byte[] b, PdfName filterName, PdfObject decodeParams, PdfDictionary streamDictionary) { ByteArrayOutputStream outputStream = enableMemoryLimitsAwareHandler(streamDictionary); b = ASCII85DecodeInternal(b, outputStream); return b; } }
ASCII85DecodeFilter extends MemoryLimitsAwareFilter { @Override public byte[] decode(byte[] b, PdfName filterName, PdfObject decodeParams, PdfDictionary streamDictionary) { ByteArrayOutputStream outputStream = enableMemoryLimitsAwareHandler(streamDictionary); b = ASCII85DecodeInternal(b, outputStream); return b; }  }
ASCII85DecodeFilter extends MemoryLimitsAwareFilter { @Override public byte[] decode(byte[] b, PdfName filterName, PdfObject decodeParams, PdfDictionary streamDictionary) { ByteArrayOutputStream outputStream = enableMemoryLimitsAwareHandler(streamDictionary); b = ASCII85DecodeInternal(b, outputStream); return b; }  static byte[] ASCII85Decode(byte[] in); @Override byte[] decode(byte[] b, PdfName filterName, PdfObject decodeParams, PdfDictionary streamDictionary); }
ASCII85DecodeFilter extends MemoryLimitsAwareFilter { @Override public byte[] decode(byte[] b, PdfName filterName, PdfObject decodeParams, PdfDictionary streamDictionary) { ByteArrayOutputStream outputStream = enableMemoryLimitsAwareHandler(streamDictionary); b = ASCII85DecodeInternal(b, outputStream); return b; }  static byte[] ASCII85Decode(byte[] in); @Override byte[] decode(byte[] b, PdfName filterName, PdfObject decodeParams, PdfDictionary streamDictionary);  }