Package com.webmethods.rtl.encode
Class Encoder
java.lang.Object
com.webmethods.rtl.encode.Encoder
- Direct Known Subclasses:
AsciiEncoder
,BASE64Encoder
,CharRefEncoder
,HexEncoder
,HTMLEncoder
,JavaEncoder
,JSEncoder
,RegexpEncoder
,ToolTipEncoder
,URLEncoder
,XMLEncoder
Encoder base class.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
CharArrayWriter that allows one to specify the char array buffer in which to write. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchar[]
decode
(char[] src) Decodes from the format.int
decode
(char[] src, char[] dst, int doffset) Decodes from the format to the specified char array.char[]
decode
(char[] src, int soffset, int length) Decodes from the format.abstract int
Decodes from the format.int
Decodes from the format to the specified char array.Decodes from the format.int
Decodes from the format to the specified string.char[]
encode
(char[] src) Encodes to the format.int
encode
(char[] src, char[] dst, int doffset) Encodes to the format to the specified char array.char[]
encode
(char[] src, int soffset, int length) Encodes to the format.abstract int
Encodes to the format.int
Encodes to the format to the specified char array.Encodes to the format.int
Encodes to the format to the specified string.
-
Constructor Details
-
Encoder
public Encoder()
-
-
Method Details
-
encode
Encodes to the format.- Parameters:
src
- String to encode.- Returns:
- Encoded String.
-
decode
Decodes from the format.- Parameters:
src
- String to decode.- Returns:
- Decoded String.
-
encode
public char[] encode(char[] src) Encodes to the format.- Parameters:
src
- Char array to encode.- Returns:
- Encoded char array.
-
decode
public char[] decode(char[] src) Decodes from the format.- Parameters:
src
- Char array to decode.- Returns:
- Decoded char array.
-
encode
public int encode(char[] src, char[] dst, int doffset) Encodes to the format to the specified char array.- Parameters:
src
- Char array to encode.dst
- Char array in which write the encoded chars.doffset
- Offset in the dst char array at which to begin writing.- Returns:
- Length of chars added to dst array.
-
decode
public int decode(char[] src, char[] dst, int doffset) Decodes from the format to the specified char array.- Parameters:
src
- Char array to decode.dst
- Char array in which to write the decoded chars.doffset
- Offset in the dst char array at which to begin writing.- Returns:
- Length of chars added to dst array.
-
encode
Encodes to the format to the specified string.- Parameters:
src
- String to encode.dst
- Writer in which to write the encoded chars.- Returns:
- Length of chars added to dst array.
- Throws:
IOException
-
decode
Decodes from the format to the specified string.- Parameters:
src
- String to decode.dst
- Writer in which write the encoded chars.- Returns:
- Length of chars added to dst array.
- Throws:
IOException
-
encode
Encodes to the format to the specified char array.- Parameters:
src
- Char array to encode.dst
- Writer in which to write the encoded chars.- Returns:
- Length of chars added to dst array.
- Throws:
IOException
-
decode
Decodes from the format to the specified char array.- Parameters:
src
- Char array to decode.dst
- Writer in which write the encoded chars.- Returns:
- Length of chars added to dst array.
- Throws:
IOException
-
encode
public char[] encode(char[] src, int soffset, int length) Encodes to the format.- Parameters:
src
- Char array to encode.soffset
- Offset in the src array at which to begin reading.length
- Length of src array to encode.- Returns:
- Encoded char array.
-
decode
public char[] decode(char[] src, int soffset, int length) Decodes from the format.- Parameters:
src
- Char array to decode.soffset
- Offset in the src array at which to begin reading.length
- Length of src array to decode.- Returns:
- Decoded char array.
-
encode
Encodes to the format.- Parameters:
src
- Char array to encode.soffset
- Offset in the src array at which to begin reading.length
- Length of src array to encode.dst
- Writer in which to write the encoded chars.- Returns:
- Length of chars written to dst.
- Throws:
IOException
-
decode
Decodes from the format.- Parameters:
src
- Char array to decode.soffset
- Offset in the src array at which to begin reading.length
- Length of src array to decode.dst
- Writer in which to write the decoded chars.- Returns:
- Length of chars written to dst.
- Throws:
IOException
-