protected CoderResult implFlush(ByteBuffer out) {
            if (shifted) {
                if (out.remaining() < 2)
                    return CoderResult.OVERFLOW;
                if (requiredBits != 6) // dump last encoded byte, zero-bit padded
                    out.put(toBase64((byte)((encodedByte << requiredBits) & 0x3F)));
                out.put((byte)'-'); // terminate shift sequence explicitly
            }
            return CoderResult.UNDERFLOW;
        }