org.apache.commons.io.input

Class CharSequenceReader

    • Field Summary

    • Constructor Summary

      Constructors 
      Constructor and Description
      CharSequenceReader(CharSequence charSequence)
      Construct a new instance with the specified character sequence.
    • Method Summary

      Methods 
      Modifier and TypeMethod and Description
      voidclose()
      Close resets the file back to the start and removes any marked position.
      voidmark(int readAheadLimit)
      Mark the current position.
      booleanmarkSupported()
      Mark is supported (returns true).
      intread()
      Read a single character.
      intread(char[] array, int offset, int length)
      Read the sepcified number of characters into the array.
      voidreset()
      Reset the reader to the last marked position (or the beginning if mark has not been called).
      longskip(long n)
      Skip the specified number of characters.
      StringtoString()
      Return a String representation of the underlying character sequence.
    • Constructor Detail

      • CharSequenceReader

        public CharSequenceReader(CharSequence charSequence)
        Construct a new instance with the specified character sequence.
        Parameters:
        charSequence - The character sequence, may be null
    • Method Detail

      • close

        public void close()
        Close resets the file back to the start and removes any marked position.
        Specified by:
        close in interface Closeable
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in class Reader
      • mark

        public void mark(int readAheadLimit)
        Mark the current position.
        Overrides:
        mark in class Reader
        Parameters:
        readAheadLimit - ignored
      • markSupported

        public boolean markSupported()
        Mark is supported (returns true).
        Overrides:
        markSupported in class Reader
        Returns:
        true
      • read

        public int read()
        Read a single character.
        Overrides:
        read in class Reader
        Returns:
        the next character from the character sequence or -1 if the end has been reached.
      • read

        public int read(char[] array,       int offset,       int length)
        Read the sepcified number of characters into the array.
        Specified by:
        read in class Reader
        Parameters:
        array - The array to store the characters in
        offset - The starting position in the array to store
        length - The maximum number of characters to read
        Returns:
        The number of characters read or -1 if there are no more
      • reset

        public void reset()
        Reset the reader to the last marked position (or the beginning if mark has not been called).
        Overrides:
        reset in class Reader
      • skip

        public long skip(long n)
        Skip the specified number of characters.
        Overrides:
        skip in class Reader
        Parameters:
        n - The number of characters to skip
        Returns:
        The actual number of characters skipped
      • toString

        public String toString()
        Return a String representation of the underlying character sequence.
        Overrides:
        toString in class Object
        Returns:
        The contents of the character sequence

Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.



NOTHING
NOTHING
Add the Maven Dependecy to your project: maven dependecy for com.amazonaws : aws-java-sdk : 1.3.14