private void parse_zTXt_chunk(PNGChunk chunk) { int textIndex = 0; StringBuffer key = new StringBuffer(); byte b; while ((b = chunk.getByte(textIndex++)) != 0) { key.append( (char)b ); } /* int method = */ chunk.getByte(textIndex++); StringBuffer value = new StringBuffer(); try { int length = chunk.getLength() - textIndex; byte[] data = chunk.getData(); InputStream cis = new ByteArrayInputStream(data, textIndex, length); InputStream iis = new InflaterInputStream(cis); int c; while ((c = iis.read()) != -1) { value.append( (char)c ); } ztextKeys.add(key.toString() ); ztextStrings.add(value.toString() ); } catch (Exception e) { e.printStackTrace(); } }
private void parse_zTXt_chunk(PNGChunk chunk) { int textIndex = 0; StringBuffer key = new StringBuffer(); byte b; while ((b = chunk.getByte(textIndex++)) != 0) { key.append( (char)b ); } /* int method = */ chunk.getByte(textIndex++); StringBuffer value = new StringBuffer(); try { int length = chunk.getLength() - textIndex; byte[] data = chunk.getData(); InputStream cis = new ByteArrayInputStream(data, textIndex, length); InputStream iis = new InflaterInputStream(cis); int c; while ((c = iis.read()) != -1) { value.append( (char)c ); } ztextKeys.add(key.toString() ); ztextStrings.add(value.toString() ); } catch (Exception e) { e.printStackTrace(); } }
private void parse_zTXt_chunk(PNGChunk chunk) { int textIndex = 0; StringBuffer key = new StringBuffer(); byte b; while ((b = chunk.getByte(textIndex++)) != 0) { key.append( (char)b ); } /* int method = */ chunk.getByte(textIndex++); StringBuffer value = new StringBuffer(); try { int length = chunk.getLength() - textIndex; byte[] data = chunk.getData(); InputStream cis = new ByteArrayInputStream(data, textIndex, length); InputStream iis = new InflaterInputStream(cis); int c; while ((c = iis.read()) != -1) { value.append( (char)c ); } ztextKeys.add(key.toString() ); ztextStrings.add(value.toString() ); } catch (Exception e) { e.printStackTrace(); } }
private void parse_zTXt_chunk(PNGChunk chunk) { int textIndex = 0; StringBuffer key = new StringBuffer(); byte b; while ((b = chunk.getByte(textIndex++)) != 0) { key.append( (char)b ); } /* int method = */ chunk.getByte(textIndex++); StringBuffer value = new StringBuffer(); try { int length = chunk.getLength() - textIndex; byte[] data = chunk.getData(); InputStream cis = new ByteArrayInputStream(data, textIndex, length); InputStream iis = new InflaterInputStream(cis); int c; while ((c = iis.read()) != -1) { value.append( (char)c ); } ztextKeys.add(key.toString() ); ztextStrings.add(value.toString() ); } catch (Exception e) { e.printStackTrace(); } }