/** * Hex-encode the current stream. * * @param toUpperCase {@code true} to use upper case characters when encoding, * {@code false} to use lower case characters * @return an iterator over the encoded characters */ public CodePointIterator hexEncode(boolean toUpperCase) { return new Base16EncodingCodePointIterator(this, toUpperCase); }
public int peekPrevious() throws NoSuchElementException { if (! hasPrevious()) throw new NoSuchElementException(); if (lo) { return hex(b >> 4); } else { return hex(iter.peekPrevious() & 0xf); } }
public int previous() throws NoSuchElementException { if (! hasPrevious()) throw new NoSuchElementException(); if (lo) { lo = false; iter.previous(); return hex(b >> 4); } else { b = iter.peekPrevious(); lo = true; return hex(b & 0xf); } }
/** * Hex-encode the current stream. * * @param toUpperCase {@code true} to use upper case characters when encoding, * {@code false} to use lower case characters * @return an iterator over the encoded characters */ public CodePointIterator hexEncode(boolean toUpperCase) { return new Base16EncodingCodePointIterator(this, toUpperCase); }
public int peekPrevious() throws NoSuchElementException { if (! hasPrevious()) throw new NoSuchElementException(); if (lo) { return hex(b >> 4); } else { return hex(iter.peekPrevious() & 0xf); } }
/** * Hex-encode the current stream. * * @param toUpperCase {@code true} to use upper case characters when encoding, * {@code false} to use lower case characters * @return an iterator over the encoded characters */ public CodePointIterator hexEncode(boolean toUpperCase) { return new Base16EncodingCodePointIterator(this, toUpperCase); }
public int peekPrevious() throws NoSuchElementException { if (! hasPrevious()) throw new NoSuchElementException(); if (lo) { return hex(b >> 4); } else { return hex(iter.peekPrevious() & 0xf); } }
public int previous() throws NoSuchElementException { if (! hasPrevious()) throw new NoSuchElementException(); if (lo) { lo = false; iter.previous(); return hex(b >> 4); } else { b = iter.peekPrevious(); lo = true; return hex(b & 0xf); } }
public int previous() throws NoSuchElementException { if (! hasPrevious()) throw new NoSuchElementException(); if (lo) { lo = false; iter.previous(); return hex(b >> 4); } else { b = iter.peekPrevious(); lo = true; return hex(b & 0xf); } }