/** * Base32-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 base32Decode(final Base32Alphabet alphabet, boolean requirePadding) { if (! hasNext()) return ByteIterator.EMPTY; if (alphabet.isLittleEndian()) { return new LittleEndianBase32DecodingByteIterator(this, requirePadding, alphabet); } else { return new BigEndianBase32DecodingByteIterator(this, requirePadding, alphabet); } }
/** * Base32-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 base32Decode(final Base32Alphabet alphabet, boolean requirePadding) { if (! hasNext()) return ByteIterator.EMPTY; if (alphabet.isLittleEndian()) { return new LittleEndianBase32DecodingByteIterator(this, requirePadding, alphabet); } else { return new BigEndianBase32DecodingByteIterator(this, requirePadding, alphabet); } }
/** * Base32-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 base32Decode(final Base32Alphabet alphabet, boolean requirePadding) { if (! hasNext()) return ByteIterator.EMPTY; if (alphabet.isLittleEndian()) { return new LittleEndianBase32DecodingByteIterator(this, requirePadding, alphabet); } else { return new BigEndianBase32DecodingByteIterator(this, requirePadding, alphabet); } }