codecs class.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static enum | _codecs.
Enumeration representing the possible endianness of UTF-32 (possibly UTF-16) encodings. |
| public static class | _codecs.
Optimized charmap encoder mapping. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static String | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyObject | |
| public static PyTuple | Returns: decoded string and number of bytes consumedsequence of bytes to decode bytes)Equivalent to |
| public static PyTuple | Returns: decoded string and number of bytes consumedsequence of bytes to decode bytes, String error policy errors)Equivalent to |
| public static PyTuple | Returns: decoded string and number of bytes consumedsequence of bytes to decode bytes, String error policy errors, PyObject to convert bytes to characters mapping)Decode a sequence of bytes into Unicode characters via a mapping supplied as a container to be indexed by the byte values (as unsigned integers). |
| public static PyTuple | Returns: decoded string and number of bytes consumedsequence of bytes to decode bytes, String error policy errors, PyObject to convert bytes to characters mapping, boolean if true, pass unmapped byte values as character codes [0..256) ignoreUnmapped)Decode a sequence of bytes into Unicode characters via a mapping supplied as a container to be indexed by the byte values (as unsigned integers). |
| public static PyTuple | Returns: (encoded data, size(str)) as a pairto be encoded str)Equivalent to |
| public static PyTuple | Returns: (encoded data, size(str)) as a pairto be encoded str, String error policy name (e.g. "ignore") errors)Equivalent to |
| public static PyTuple | Returns: (encoded data, size(str)) as a pairto be encoded str, String error policy name (e.g. "ignore") errors, PyObject from character code to output byte (or string) mapping)Encoder based on an optional character mapping. |
| private static PyTuple | Returns: (encoded data, size(str)) as a pairto be encoded str, String error policy name (e.g. "ignore") errors, PyObject from character code to output byte (or string) mapping, StringBuilder to contain the encoded bytes v, boolean letLookupHandleError)Helper to implement the several variants of |
| public static PyObject | Returns: Unicode string decoded frombytesto be decoded bytes)Decode |
| public static PyObject | |
| public static PyObject | |
| private static PyTuple | Returns: the tuple (unicode(u), bytesConsumed)the unicode result as a UTF-16 Java String u, int the number of bytes consumed bytesConsumed)Convenience method to construct the return value of decoders, providing the Unicode result as a String, and the number of bytes consumed. |
| private static PyTuple | Returns: the tuple (unicode(u), bytesConsumed)the unicode result as a UTF-16 Java String u, int[] if not null, element [0] is the number of bytes consumed consumed, int if consumed==null, use this as the number of bytes consumed defConsumed)Convenience method to construct the return value of decoders, providing the Unicode result as a String, and the number of bytes consumed in decoding as either a single-element array or an int to be used if the array argument is null. |
| private static PyTuple | Returns: the tuple (unicode(u), bytesConsumed, byteOrder)the unicode result as a UTF-16 Java String u, int the number of bytes consumed bytesConsumed, _codecs.the byte order (deduced by codec) orderConvenience method to construct the return value of decoders that infer the byte order from the byte-order mark. |
| private static PyTuple | |
| private static String | |
| private static String | |
| public static PyString | Returns: bytes object encodingunicodestring to be encoded unicode)Encode |
| public static PyString | |
| public static PyString | |
| private static PyTuple | |
| public static String | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| private static int | Returns: index of last character of problematic sectionto be encoded str, String error policy name (e.g. "ignore") errors, PyObject from character code to output byte (or string) mapping, StringBuilder to contain the encoded bytes v, int of str size, int index in str of current (and problematic) character i)Helper for |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyObject | |
| private static int | Returns: number of elements consumed now frombytes arraycharacter output unicode, String input represented as String (Jython PyString convention) bytes, int number of elements already consumed from q, int bytes array(multiple of 4) first byte not to process limit, String error policy name (e.g. "ignore", "replace") errors)Helper to |
| private static int | Returns: number of elements consumed now frombytes arraycharacter output unicode, String input represented as String (Jython PyString convention) bytes, int number of elements already consumed from q, int bytes array(multiple of 4) first byte not to process limit, String error policy name (e.g. "ignore", "replace") errors)Helper to |
| private static PyTuple | Returns: tuple (unicode_result, bytes_consumed [, endianness])input represented as String (Jython PyString convention) bytes, String error policy name (e.g. "ignore", "replace") errors, _codecs.LE, BE or UNDEFINED (meaning bytes may begin with a byte order mark) order,if a "final" call, meaning the input must all be consumed isFinal, boolean if the returned tuple should include a report of the byte order findOrder)Decode (perhaps partially) a sequence of bytes representing the UTF-32 encoded form of a Unicode string and return as a tuple the (Jython internal representation of) the unicode text, the amount of input consumed, and if requested, the decoding "endianness" used (in Python -1, 0, +1 conventions). |
| private static PyTuple | Returns: tuple (encoded_bytes, unicode_consumed)to be encoded unicode, String error policy name or null meaning "strict" errors, _codecs.byte order to use BE, LE or UNDEFINED (a BOM will be written) orderEncode a Unicode Java String as UTF-32 in specified byte order. |
| private static int | Returns: number of Java characters consumed from unicodeoutput buffer building String of bytes (Jython PyString convention) v, String character input unicode, String error policy name (e.g. "ignore", "replace") errors)Helper to |
| private static int | Returns: position within input at which to restartoutput buffer building String of bytes (Jython PyString convention) v, String error policy name (e.g. "ignore", "replace") errors, _codecs.LE or BE indicator order,character input toEncode, int index of first problematic character start, int index of character after the last problematic character end, String text contribution to the exception raised (if any) reason)Specific UTF-32 encoder error handler. |
| private static int | Returns: number of Java characters consumed from unicodeoutput buffer building String of bytes (Jython PyString convention) v, String character input unicode, String error policy name (e.g. "ignore", "replace") errors)Helper to |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static void | |
| public static void | |
| public static PyObject | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | unicode_internal_decode(String bytes)
Deprecated
Legacy method to decode given bytes as if CPython wide-build internal format (equivalent UTF-32BE). |
| public static PyTuple | unicode_internal_decode(String bytes, String errors)
Deprecated
Legacy method to decode given bytes as if CPython wide-build internal format (equivalent UTF-32BE). |
| public static PyTuple | unicode_internal_encode(String unicode)
Deprecated
Legacy method to encode given unicode in CPython wide-build internal format (equivalent UTF-32BE). |
| public static PyTuple | unicode_internal_encode(String unicode, String errors)
Deprecated
Legacy method to encode given unicode in CPython wide-build internal format (equivalent UTF-32BE). |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | Returns: tuple (unicode_result, bytes_consumed)to be decoded (Jython bytes)PyString convention)Decode a sequence of bytes representing the UTF-32 big-endian encoded form of a Unicode string and return as a tuple the unicode text, and the amount of input consumed. |
| public static PyTuple | Returns: tuple (unicode_result, bytes_consumed)to be decoded (Jython bytes, String PyString convention)error policy name (e.g. "ignore", "replace") errors)Decode a sequence of bytes representing the UTF-32 big-endian encoded form of a Unicode string and return as a tuple the unicode text, and the amount of input consumed. |
| public static PyTuple | Returns: tuple (unicode_result, bytes_consumed)to be decoded (Jython bytes, String PyString convention)error policy name (e.g. "ignore", "replace") errors, boolean if a "final" call, meaning the input must all be consumed isFinal)Decode (perhaps partially) a sequence of bytes representing the UTF-32 big-endian encoded form of a Unicode string and return as a tuple the unicode text, and the amount of input consumed. |
| public static PyTuple | Returns: tuple (encoded_bytes, unicode_consumed)to be encoded unicode)Encode a Unicode Java String as UTF-32 with big-endian byte order. |
| public static PyTuple | Returns: tuple (encoded_bytes, unicode_consumed)to be encoded unicode, String error policy name or null meaning "strict" errors)Encode a Unicode Java String as UTF-32 with big-endian byte order. |
| public static PyTuple | Returns: tuple (unicode_result, bytes_consumed)to be decoded (Jython bytes)PyString convention)Decode (perhaps partially) a sequence of bytes representing the UTF-32 encoded form of a Unicode string and return as a tuple the unicode text, and the amount of input consumed. |
| public static PyTuple | Returns: tuple (unicode_result, bytes_consumed)to be decoded (Jython bytes, String PyString convention)error policy name (e.g. "ignore", "replace") errors)Decode a sequence of bytes representing the UTF-32 encoded form of a Unicode string and return as a tuple the unicode text, and the amount of input consumed. |
| public static PyTuple | Returns: tuple (unicode_result, bytes_consumed)to be decoded (Jython bytes, String PyString convention)error policy name (e.g. "ignore", "replace") errors, boolean if a "final" call, meaning the input must all be consumed isFinal)Decode (perhaps partially) a sequence of bytes representing the UTF-32 encoded form of a Unicode string and return as a tuple the unicode text, and the amount of input consumed. |
| public static PyTuple | Returns: tuple (encoded_bytes, unicode_consumed)to be encoded unicode)Encode a Unicode Java String as UTF-32 with byte order mark. |
| public static PyTuple | Returns: tuple (encoded_bytes, unicode_consumed)to be encoded unicode, String error policy name or null meaning "strict" errors)Encode a Unicode Java String as UTF-32 with byte order mark. |
| public static PyTuple | Returns: tuple (encoded_bytes, unicode_consumed)to be encoded unicode, String error policy name or null meaning "strict" errors, int decoding "endianness" specified (in the Python -1, 0, +1 convention) byteorder)Encode a Unicode Java String as UTF-32 in specified byte order with byte order mark. |
| public static PyTuple | Returns: tuple (unicode_result, bytes_consumed, endianness)to be decoded (Jython bytes, String PyString convention)error policy name (e.g. "ignore", "replace") errors, int decoding "endianness" specified (in the Python -1, 0, +1 convention) byteorder)Decode a sequence of bytes representing the UTF-32 encoded form of a Unicode string and return as a tuple the unicode text, the amount of input consumed, and the decoding "endianness" used (in the Python -1, 0, +1 convention). |
| public static PyTuple | Returns: tuple (unicode_result, bytes_consumed, endianness)to be decoded (Jython bytes, String PyString convention)error policy name (e.g. "ignore", "replace") errors, int decoding "endianness" specified (in the Python -1, 0, +1 convention) byteorder, boolean if a "final" call, meaning the input must all be consumed isFinal)Decode (perhaps partially) a sequence of bytes representing the UTF-32 encoded form of a Unicode string and return as a tuple the unicode text, the amount of input consumed, and the decoding "endianness" used (in the Python -1, 0, +1 convention). |
| public static PyTuple | Returns: tuple (unicode_result, bytes_consumed)to be decoded (Jython bytes)PyString convention)Decode a sequence of bytes representing the UTF-32 little-endian encoded form of a Unicode string and return as a tuple the unicode text, and the amount of input consumed. |
| public static PyTuple | Returns: tuple (unicode_result, bytes_consumed)to be decoded (Jython bytes, String PyString convention)error policy name (e.g. "ignore", "replace") errors)Decode a sequence of bytes representing the UTF-32 little-endian encoded form of a Unicode string and return as a tuple the unicode text, and the amount of input consumed. |
| public static PyTuple | Returns: tuple (unicode_result, bytes_consumed)to be decoded (Jython bytes, String PyString convention)error policy name (e.g. "ignore", "replace") errors, boolean if a "final" call, meaning the input must all be consumed isFinal)Decode (perhaps partially) a sequence of bytes representing the UTF-32 little-endian encoded form of a Unicode string and return as a tuple the unicode text, and the amount of input consumed. |
| public static PyTuple | Returns: tuple (encoded_bytes, unicode_consumed)to be encoded unicode)Encode a Unicode Java String as UTF-32 with little-endian byte order. |
| public static PyTuple | Returns: tuple (encoded_bytes, unicode_consumed)to be encoded unicode, String error policy name or null meaning "strict" errors)Encode a Unicode Java String as UTF-32 with little-endian byte order. |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple | |
| public static PyTuple |