Class ValueEncoderFactory.Base64Encoder

java.lang.Object
org.codehaus.stax2.ri.typed.AsciiValueEncoder
org.codehaus.stax2.ri.typed.ValueEncoderFactory.Base64Encoder
Enclosing class:
ValueEncoderFactory

static final class ValueEncoderFactory.Base64Encoder extends AsciiValueEncoder
  • Field Details

    • PAD_CHAR

      static final char PAD_CHAR
      See Also:
    • PAD_BYTE

      static final byte PAD_BYTE
      See Also:
    • LF_CHAR

      static final byte LF_CHAR
      See Also:
    • LF_BYTE

      static final byte LF_BYTE
      See Also:
    • _variant

      final Base64Variant _variant
    • _input

      final byte[] _input
    • _inputPtr

      int _inputPtr
    • _inputEnd

      final int _inputEnd
    • _chunksBeforeLf

      int _chunksBeforeLf
      We need a counter to know when to add mandatory linefeed.
  • Constructor Details

    • Base64Encoder

      protected Base64Encoder(Base64Variant v, byte[] values, int from, int end)
  • Method Details

    • isCompleted

      public boolean isCompleted()
      Description copied from class: AsciiValueEncoder
      Method that can alternatively be called to determine whether encoder has encoded all data it has. Generally called right after a call to AsciiValueEncoder.encodeMore(char[], int, int), to figure out whether buffer flush is needed (there is more data), or encoding is complete.
      Specified by:
      isCompleted in class AsciiValueEncoder
    • encodeMore

      public int encodeMore(char[] buffer, int outPtr, int outEnd)
      Specified by:
      encodeMore in class AsciiValueEncoder
      Returns:
      Value of pointer after all remaining data (which may be "none") that can be encoded (as constrained by buffer length) has been encoded. Has to exceed 'ptr' value sent in; will be equal to it if nothing was encoded (which should only occur when everything has been encoded, as long as AsciiValueEncoder.bufferNeedsFlush(int) is appropriately called once before calling this method)
    • encodeMore

      public int encodeMore(byte[] buffer, int outPtr, int outEnd)
      Specified by:
      encodeMore in class AsciiValueEncoder
      Returns:
      Value of pointer after all remaining data (which may be "none") that can be encoded (as constrained by buffer length) has been encoded. Has to exceed 'ptr' value sent in; will be equal to it if nothing was encoded (which should only occur when everything has been encoded, as long as AsciiValueEncoder.bufferNeedsFlush(int) is appropriately called once before calling this method)