/** * Base32-decode the current stream, assuming that the byte data is encoded in an ASCII-derived encoding. * * @param alphabet the alphabet to use * @return an iterator over the decoded bytes */ public ByteIterator base32Decode(final Base32Alphabet alphabet) { return super.base32Decode(alphabet, true); }
/** * 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) { return super.base64Decode(alphabet, requirePadding); }
public boolean hasNext() { if (havePair) { return true; } if (! NumericIterator.this.hasNext()) { return false; } int b0 = NumericIterator.this.next(); if (! NumericIterator.this.hasNext()) { throw log.expectedEvenNumberOfHexCharacters(); } int b1 = NumericIterator.this.next(); b = calc(b0, b1); havePair = true; return true; }
public ByteIterator base64Decode(final Base64Alphabet alphabet, boolean requirePadding) { if (! hasNext()) return ByteIterator.EMPTY; if (alphabet.littleEndian) { return this.new Base64ByteIterator(requirePadding) {
/** * Hex-decode the current stream. * * @return an iterator over the decoded bytes */ public ByteIterator hexDecode() { return super.hexDecode(); }
NumericIterator.this.prev(); // skip = NumericIterator.this.prev(); // skip = case 9: int b3 = NumericIterator.this.prev(); int b2 = NumericIterator.this.peekPrev(); NumericIterator.this.next(); if (state == 4) { NumericIterator.this.next(); } else if (state == 6) { NumericIterator.this.next(); NumericIterator.this.next();
public ByteIterator hexDecode() { if (! hasNext()) return ByteIterator.EMPTY; return new ByteIterator() { private int b;
/** * Hex-decode the current stream, assuming that the byte data is encoded in an ASCII-derived encoding. * * @return an iterator over the decoded bytes */ public ByteIterator hexDecode() { return super.hexDecode(); }
public boolean hasNext() { if (state == 0) { if (! NumericIterator.this.hasNext()) { return false; int b0 = NumericIterator.this.next(); if (b0 == '=') { throw log.unexpectedPadding(); if (! NumericIterator.this.hasNext()) { if (requirePadding) { throw log.expectedPadding(); int b1 = NumericIterator.this.next(); if (b1 == '=') { throw log.unexpectedPadding(); if (! NumericIterator.this.hasNext()) { if (requirePadding) { log.expectedPadding(); int b2 = NumericIterator.this.next(); if (b2 == '=') { if (! NumericIterator.this.hasNext()) { throw log.expectedTwoPaddingCharacters(); if (NumericIterator.this.next() != '=') { throw log.expectedTwoPaddingCharacters(); if (! NumericIterator.this.hasNext()) {
/** * Base32-decode the current stream, assuming that the byte data is encoded in an ASCII-derived encoding. * * @return an iterator over the decoded bytes */ public ByteIterator base32Decode() { return super.base32Decode(Base32Alphabet.STANDARD, true); }
/** * Base64-decode the current stream, assuming that the byte data is encoded in an ASCII-derived encoding. * * @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) { return super.base64Decode(alphabet, requirePadding); }
NumericIterator.this.prev(); // consume character int b7 = NumericIterator.this.prev(); int b6 = NumericIterator.this.prev(); int b5 = NumericIterator.this.prev(); int b4 = NumericIterator.this.prev(); int b3 = NumericIterator.this.prev(); int b2 = NumericIterator.this.prev(); int b1 = NumericIterator.this.prev(); int b0 = NumericIterator.this.prev(); o0 = calc0(b0, b1); o1 = calc1(b1, b2, b3);
public ByteIterator base32Decode(final Base32Alphabet alphabet, boolean requirePadding) { if (! hasNext()) return ByteIterator.EMPTY; if (alphabet.littleEndian) { return this.new Base32ByteIterator(requirePadding) {
/** * Hex-decode the current stream, assuming that the byte data is encoded in an ASCII-derived encoding. * * @return an iterator over the decoded bytes */ public ByteIterator hexDecode() { return super.hexDecode(); }
public boolean hasNext() { if (state == 0) { if (! NumericIterator.this.hasNext()) { return false; int b0 = NumericIterator.this.next(); if (b0 == '=') { throw log.unexpectedPadding(); if (! NumericIterator.this.hasNext()) { if (requirePadding) { throw log.expectedPadding(); int b1 = NumericIterator.this.next(); if (b1 == '=') { throw log.unexpectedPadding(); if (! NumericIterator.this.hasNext()) { if (requirePadding) { throw log.expectedPadding(); int b2 = NumericIterator.this.next(); if (b2 == '=') { for (int i = 0; i < 5; i++) { if (! NumericIterator.this.hasNext()) { throw log.expectedPaddingCharacters(6); if (NumericIterator.this.next() != '=') { throw log.expectedPaddingCharacters(6);