Package totalcross.io

Class CompressedByteArrayStream.DirectCharConverter

  • All Implemented Interfaces:
    java.lang.Comparable<java.nio.charset.Charset>
    Enclosing class:
    CompressedByteArrayStream

    public static class CompressedByteArrayStream.DirectCharConverter
    extends CharacterConverter
    Implements a CharacterConverter that converts from char[] to byte[] which just casts the char to byte; thus, ignoring any non-ASCII character.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] chars2bytes​(char[] chars, int offset, int length)
      Just casts the char to byte; thus, ignoring any non-ASCII character.
      • Methods inherited from class java.nio.charset.Charset

        aliases, availableCharsets, canEncode, compareTo, decode, defaultCharset, displayName, displayName, encode, encode, equals, forName, hashCode, isRegistered, isSupported, name, toString
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DirectCharConverter

        public DirectCharConverter()
    • Method Detail

      • chars2bytes

        public byte[] chars2bytes​(char[] chars,
                                  int offset,
                                  int length)
        Just casts the char to byte; thus, ignoring any non-ASCII character.
        Overrides:
        chars2bytes in class CharacterConverter