public ByteBuffer append(byte[] b) { return append(b, 0, b.length); }
/** * Creates a PdfLiteral that contains an array of two id entries. These entries are both hexadecimal * strings containing 16 hex characters. The first entry is the original id, the second entry * should be different from the first one if the document has changed. * * @param firstId the first id * @param secondId the second id * @return PdfObject containing the two entries. */ public static PdfObject createInfoId(byte[] firstId, byte[] secondId) { if ( firstId.length < 16 ) { firstId = padByteArrayTo16(firstId); } if ( secondId.length < 16 ) { secondId = padByteArrayTo16(secondId); } com.itextpdf.io.source.ByteBuffer buf = new com.itextpdf.io.source.ByteBuffer(90); buf.append('[').append('<'); for (int k = 0; k < firstId.length; ++k) buf.appendHex(firstId[k]); buf.append('>').append('<'); for (int k = 0; k < secondId.length; ++k) buf.appendHex(secondId[k]); buf.append('>').append(']'); return new PdfLiteral(buf.toByteArray()); }
public ByteBuffer append(byte[] b) { return append(b, 0, b.length); }
public ByteBuffer append(int b) { return append((byte) b); }
public ByteBuffer append(int b) { return append((byte) b); }
public ByteBuffer append(String str) { return append(ByteUtils.getIsoBytes(str)); }
public ByteBuffer append(String str) { return append(ByteUtils.getIsoBytes(str)); }
private void serArray(PdfArray array, ByteBuffer bb, int level, Map<PdfIndirectReference, byte[]> serializedCache) throws SelfReferenceException { bb.append("$A"); if (level <= 0) return; for (int k = 0; k < array.size(); ++k) { serObject(array.get(k, false), bb, level, serializedCache); } bb.append("$\\A"); }
private void Fax4PostEncode() { putBits(EOL, 12); putBits(EOL, 12); if (bit != 8) { outBuf.append((byte)data); data = 0; bit = 8; } }
private void Fax4PostEncode() { putBits(EOL, 12); putBits(EOL, 12); if (bit != 8) { outBuf.append((byte)data); data = 0; bit = 8; } }
private void serDic(PdfDictionary dic, ByteBuffer bb, int level, Map<PdfIndirectReference, byte[]> serializedCache) throws SelfReferenceException { bb.append("$D"); if (level <= 0) return; for (PdfName key : dic.keySet()) { if (isKeyRefersBack(dic, key)) { continue; } serObject(key, bb, level, serializedCache); serObject(dic.get(key, false), bb, level, serializedCache); } bb.append("$\\D"); }