com.nothome.delta.text
Class CharBufferSeekableSource

java.lang.Object
  extended by com.nothome.delta.text.CharBufferSeekableSource
All Implemented Interfaces:
SeekableSource, Closeable, Readable

public class CharBufferSeekableSource
extends Object
implements SeekableSource

Wrapper for a CharBuffer.


Constructor Summary
CharBufferSeekableSource(CharBuffer cb)
          Constructs a new CharBufferSeekableSource.
CharBufferSeekableSource(CharSequence seq)
          Constructs a new CharBufferSeekableSource from a char sequence (String).
 
Method Summary
 void close()
           
 int read(CharBuffer charbuffer)
           
 void seek(long pos)
          Sets the position for the next read operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CharBufferSeekableSource

public CharBufferSeekableSource(CharBuffer cb)
Constructs a new CharBufferSeekableSource.


CharBufferSeekableSource

public CharBufferSeekableSource(CharSequence seq)
Constructs a new CharBufferSeekableSource from a char sequence (String).

Method Detail

seek

public void seek(long pos)
          throws IOException
Description copied from interface: SeekableSource
Sets the position for the next read operation.

Specified by:
seek in interface SeekableSource
Throws:
IOException

read

public int read(CharBuffer charbuffer)
         throws IOException
Specified by:
read in interface Readable
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Throws:
IOException


Copyright © 2003-2008. All Rights Reserved.