com.liferay.portal.kernel.io.unsync
Class UnsyncStringReader

java.lang.Object
  extended by java.io.Reader
      extended by com.liferay.portal.kernel.io.unsync.UnsyncStringReader
All Implemented Interfaces:
java.io.Closeable, java.lang.Readable

public class UnsyncStringReader
extends java.io.Reader

View Source

See http://issues.liferay.com/browse/LPS-6648.

Author:
Shuyang Zhou

Field Summary
protected  int index
           
protected  int markIndex
           
protected  java.lang.String string
           
protected  int stringLength
           
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
UnsyncStringReader(java.lang.String string)
           
 
Method Summary
 void close()
           
 void mark(int readAheadLimit)
           
 boolean markSupported()
           
 int read()
           
 int read(char[] charArray)
           
 int read(char[] charArray, int offset, int length)
           
 int read(java.nio.CharBuffer charBuffer)
           
 boolean ready()
           
 void reset()
           
 long skip(long skip)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

index

protected int index

stringLength

protected int stringLength

markIndex

protected int markIndex

string

protected java.lang.String string
Constructor Detail

UnsyncStringReader

public UnsyncStringReader(java.lang.String string)
Method Detail

close

public void close()
Specified by:
close in interface java.io.Closeable
Specified by:
close in class java.io.Reader

mark

public void mark(int readAheadLimit)
          throws java.io.IOException
Overrides:
mark in class java.io.Reader
Throws:
java.io.IOException

markSupported

public boolean markSupported()
Overrides:
markSupported in class java.io.Reader

read

public int read()
         throws java.io.IOException
Overrides:
read in class java.io.Reader
Throws:
java.io.IOException

read

public int read(char[] charArray)
         throws java.io.IOException
Overrides:
read in class java.io.Reader
Throws:
java.io.IOException

read

public int read(char[] charArray,
                int offset,
                int length)
         throws java.io.IOException
Specified by:
read in class java.io.Reader
Throws:
java.io.IOException

read

public int read(java.nio.CharBuffer charBuffer)
         throws java.io.IOException
Specified by:
read in interface java.lang.Readable
Overrides:
read in class java.io.Reader
Throws:
java.io.IOException

ready

public boolean ready()
              throws java.io.IOException
Overrides:
ready in class java.io.Reader
Throws:
java.io.IOException

reset

public void reset()
           throws java.io.IOException
Overrides:
reset in class java.io.Reader
Throws:
java.io.IOException

skip

public long skip(long skip)
Overrides:
skip in class java.io.Reader