Class GapListPrimitives

  • Direct Known Subclasses:
    GapLists

    public class GapListPrimitives
    extends java.lang.Object
    This class implements helper for primitives. Public access is granted through GapLists.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      protected static void add​(java.lang.CharSequence str, CharGapList list, int start, int end)
      Add specified number of chars from CharSequence into CharGapList.
      protected static int read​(java.io.InputStream istream, ByteGapList list, int len)
      Read specified number of bytes from InputStream into ByteGapList.
      protected static int read​(java.io.Reader reader, CharGapList list, int len)
      Read specified number of chars from Reader into CharGapList.
      protected static void write​(java.io.OutputStream ostream, ByteGapList list, int off, int len)
      Write specified number of bytes from ByteGapList into OutputStream.
      protected static void write​(java.io.Writer writer, CharGapList list, int off, int len)
      Write specified number of chars from CharGapList into Writer.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GapListPrimitives

        public GapListPrimitives()
    • Method Detail

      • read

        protected static int read​(java.io.InputStream istream,
                                  ByteGapList list,
                                  int len)
                           throws java.io.IOException
        Read specified number of bytes from InputStream into ByteGapList.
        Parameters:
        istream - input stream (source)
        list - list (target)
        len - maximum number of bytes to read
        Returns:
        number of bytes read into the buffer, -1 if end of stream has been reached
        Throws:
        java.io.IOException
      • write

        protected static void write​(java.io.OutputStream ostream,
                                    ByteGapList list,
                                    int off,
                                    int len)
                             throws java.io.IOException
        Write specified number of bytes from ByteGapList into OutputStream.
        Parameters:
        ostream - output stream (target)
        list - list (source)
        off - offset of first byte to write
        len - number of bytes to write
        Throws:
        java.io.IOException
      • read

        protected static int read​(java.io.Reader reader,
                                  CharGapList list,
                                  int len)
                           throws java.io.IOException
        Read specified number of chars from Reader into CharGapList.
        Parameters:
        reader - reader (source)
        list - list (target)
        len - maximum number of bytes to read
        Returns:
        number of bytes read into the buffer, -1 if end of stream has been reached
        Throws:
        java.io.IOException
      • write

        protected static void write​(java.io.Writer writer,
                                    CharGapList list,
                                    int off,
                                    int len)
                             throws java.io.IOException
        Write specified number of chars from CharGapList into Writer.
        Parameters:
        writer - writer (target)
        list - list (source)
        off - offset of first char to write
        len - number of chars to write
        Throws:
        java.io.IOException
      • add

        protected static void add​(java.lang.CharSequence str,
                                  CharGapList list,
                                  int start,
                                  int end)
        Add specified number of chars from CharSequence into CharGapList.
        Parameters:
        str - CharSequence (source)
        list - list (target)
        start - start position of characters to add in CharSequence
        end - end position of characters to add in CharSequence