/** * Base64-decode the current stream. * * @param alphabet the alphabet to use * @param requirePadding {@code true} to require padding, {@code false} if padding is optional * @return an iterator over the decoded bytes */ public ByteIterator base64Decode(final Base64Alphabet alphabet, boolean requirePadding) { if (! hasNext()) return ByteIterator.EMPTY; if (alphabet.isLittleEndian()) { return new LittleEndianBase64DecodingByteIterator(this, requirePadding, alphabet); } else { return new BigEndianBase64DecodingByteIterator(this, requirePadding, alphabet); } }
/** * Base64-decode the current stream. * * @param alphabet the alphabet to use * @param requirePadding {@code true} to require padding, {@code false} if padding is optional * @return an iterator over the decoded bytes */ public ByteIterator base64Decode(final Base64Alphabet alphabet, boolean requirePadding) { if (! hasNext()) return ByteIterator.EMPTY; if (alphabet.isLittleEndian()) { return new LittleEndianBase64DecodingByteIterator(this, requirePadding, alphabet); } else { return new BigEndianBase64DecodingByteIterator(this, requirePadding, alphabet); } }
/** * Base64-decode the current stream. * * @param alphabet the alphabet to use * @param requirePadding {@code true} to require padding, {@code false} if padding is optional * @return an iterator over the decoded bytes */ public ByteIterator base64Decode(final Base64Alphabet alphabet, boolean requirePadding) { if (! hasNext()) return ByteIterator.EMPTY; if (alphabet.isLittleEndian()) { return new LittleEndianBase64DecodingByteIterator(this, requirePadding, alphabet); } else { return new BigEndianBase64DecodingByteIterator(this, requirePadding, alphabet); } }