public ByteStringBuilder appendTo(final ByteStringBuilder builder) { builder.append(bytes, offs + idx, len - idx); idx = len; return builder; } };
public ByteStringBuilder append(ByteStringBuilder other) { append(other.content, 0, other.length); return this; }
public ByteStringBuilder append(String s) { return append(s, 0, s.length()); }
public ByteStringBuilder append(CharSequence s) { return append(s, 0, s.length()); }
/** * Generate PEM content to the given byte string builder. The appropriate header and footer surrounds the base-64 * encoded value. * * @param target the target byte string builder (must not be {@code null}) * @param type the content type (must not be {@code null}) * @param content the content iterator (must not be {@code null}) * @throws IllegalArgumentException if there is a problem with the data or the type * @deprecated Use {@link #generatePemContent(ByteStringBuilder, String, ByteIterator)} instead */ @Deprecated public static void generatePemContent(org.wildfly.security.util.ByteStringBuilder target, String type, ByteIterator content) throws IllegalArgumentException { Assert.checkNotNullParam("target", target); Assert.checkNotNullParam("type", type); Assert.checkNotNullParam("content", content); final Matcher matcher = VALID_LABEL.matcher(type); if (matcher.find()) { throw log.invalidPemType("<any valid PEM type>", type); } target.append("-----BEGIN ").append(type).append("-----"); target.append(content.base64Encode().drainToString(System.lineSeparator(), 64)); // insert the line separator before every 64 code points target.append(System.lineSeparator()).append("-----END ").append(type).append("-----").append(System.lineSeparator()); }
public ByteStringBuilder appendLatin1(CodePointIterator iterator) { int cp; while (iterator.hasNext()) { cp = iterator.next(); if (cp > 255) throw new IllegalArgumentException(); append((byte) cp); } return this; }
public ByteStringBuilder appendAscii(CodePointIterator iterator) { int cp; while (iterator.hasNext()) { cp = iterator.next(); if (cp > 127) throw new IllegalArgumentException(); append((byte) cp); } return this; }
public ByteStringBuilder appendTo(final ByteStringBuilder builder) { final byte[] buffer = OP_BUFFER.get(); int cnt = drain(buffer); while (cnt > 0) { builder.append(buffer, 0, cnt); cnt = drain(buffer); } return builder; }
public ByteStringBuilder appendTo(final ByteStringBuilder builder) { builder.append(bytes, offs + idx, len - idx); idx = len; return builder; } };
public ByteStringBuilder appendTo(final ByteStringBuilder builder) { builder.append(bytes, offs + idx, len - idx); idx = len; return builder; } };
public ByteStringBuilder append(ByteStringBuilder other) { append(other.content, 0, other.length); return this; }
public ByteStringBuilder append(CharSequence s) { return append(s, 0, s.length()); }
public ByteStringBuilder append(String s) { return append(s, 0, s.length()); }
public ByteStringBuilder appendAscii(CodePointIterator iterator) { int cp; while (iterator.hasNext()) { cp = iterator.next(); if (cp > 127) throw new IllegalArgumentException(); append((byte) cp); } return this; }
public ByteStringBuilder appendLatin1(CodePointIterator iterator) { int cp; while (iterator.hasNext()) { cp = iterator.next(); if (cp > 255) throw new IllegalArgumentException(); append((byte) cp); } return this; }
public ByteStringBuilder appendTo(final ByteStringBuilder builder) { final byte[] buffer = OP_BUFFER.get(); int cnt = drain(buffer); while (cnt > 0) { builder.append(buffer, 0, cnt); cnt = drain(buffer); } return builder; }
public ByteStringBuilder appendLatin1(CodePointIterator iterator) { int cp; while (iterator.hasNext()) { cp = iterator.next(); if (cp > 255) throw new IllegalArgumentException(); append((byte) cp); } return this; }
public ByteStringBuilder appendAscii(CodePointIterator iterator) { int cp; while (iterator.hasNext()) { cp = iterator.next(); if (cp > 127) throw new IllegalArgumentException(); append((byte) cp); } return this; }
public ByteStringBuilder appendTo(final ByteStringBuilder builder) { final byte[] buffer = OP_BUFFER.get(); int cnt = drain(buffer); while (cnt > 0) { builder.append(buffer, 0, cnt); cnt = drain(buffer); } return builder; }