Module jls.util.codec

Provide codec functions.

Available algorithms are base64, deflate, gzip, hex.

Functions

getCodec (alg) Returns a codec.
decode (alg, data) Returns the decoded data.
encode (alg, data) Returns the encoded data.
decodeStream (alg, sh) Returns an decoding jls.io.streams.StreamHandler.
encodeStream (alg, sh) Returns an encoding jls.io.streams.StreamHandler.


Functions

getCodec (alg)
Returns a codec.

Parameters:

  • alg string the name of the encoding or decoding algorithm

Returns:

    the codec
decode (alg, data)
Returns the decoded data.

Parameters:

  • alg string the name of the decoding algorithm
  • data string the data to decode

Returns:

    string the decoded data
encode (alg, data)
Returns the encoded data.

Parameters:

  • alg string the name of the encoding algorithm
  • data string the data to encode

Returns:

    string the encoded data
decodeStream (alg, sh)
Returns an decoding jls.io.streams.StreamHandler.

Parameters:

  • alg string the name of the decoding algorithm
  • sh StreamHandler the wrapped stream that will handle the decoded data

Returns:

    StreamHandler the stream handler that will decode data
encodeStream (alg, sh)
Returns an encoding jls.io.streams.StreamHandler.

Parameters:

  • alg string the name of the encoding algorithm
  • sh StreamHandler the wrapped stream that will handle the encoded data

Returns:

    StreamHandler the stream handler that will encode data
generated by LDoc 1.4.6 Last updated 2022-04-10 21:20:13