private boolean isInterfaceStabilityClass(Class<?> c) { return c.equals(InterfaceStability.Stable.class) || c.equals(InterfaceStability.Unstable.class) || c.equals(InterfaceStability.Evolving.class); }
/** * Constructs a {@link Base64OutputStream} in either ENCODE or DECODE mode. * <p> * Valid options: * * <ul> * <li>ENCODE or DECODE: Encode or Decode as data is read.</li> * <li>DONT_BREAK_LINES: don't break lines at 76 characters (only * meaningful when encoding) <i>Note: Technically, this makes your * encoding non-compliant.</i></li> * </ul> * * <p> * Example: <code>new Base64.Base64OutputStream( out, Base64.ENCODE )</code> * * @param out the <tt>OutputStream</tt> to which data will be written. * @param options Specified options. * @see Base64#ENCODE * @see Base64#DECODE * @see Base64#DONT_BREAK_LINES * @since 1.3 */ @InterfaceAudience.Public @InterfaceStability.Stable public Base64OutputStream(OutputStream out, int options) { super(out); this.breakLines = (options & DONT_BREAK_LINES) != DONT_BREAK_LINES; this.encode = (options & ENCODE) == ENCODE; this.bufferLength = encode ? 3 : 4; this.buffer = new byte[bufferLength]; this.position = 0; this.lineLength = 0; this.suspendEncoding = false; this.b4 = new byte[4]; this.options = options; this.decodabet = getDecodabet(options); }