com.imagero.uio.bio.content
Class CharArrayContent

java.lang.Object
  extended bycom.imagero.uio.bio.content.Content
      extended bycom.imagero.uio.bio.content.CharArrayContent

public class CharArrayContent
extends Content

Date: 05.01.2008


Constructor Summary
CharArrayContent(char[][] data)
           
CharArrayContent(char[][] data, boolean bigEndian)
           
 
Method Summary
 boolean canReload()
          Determine if data may be reloaded or not.
 void close()
          close stream
 long length()
          Get stream length.
 int load(long offset, int bpos, byte[] dest)
          Load stream content to specified buffer
 void save(long offset, int spos, byte[] src, int length)
          Save data to current content (char array).
 boolean writable()
           
 
Methods inherited from class com.imagero.uio.bio.content.Content
finalize, load
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CharArrayContent

public CharArrayContent(char[][] data)

CharArrayContent

public CharArrayContent(char[][] data,
                        boolean bigEndian)
Method Detail

load

public int load(long offset,
                int bpos,
                byte[] dest)
         throws java.io.IOException
Description copied from class: Content
Load stream content to specified buffer

Specified by:
load in class Content
Parameters:
offset - stream offset
bpos - buffer position
dest - byte array
Returns:
how much bytes were loaded
Throws:
java.io.IOException

close

public void close()
Description copied from class: Content
close stream

Specified by:
close in class Content

save

public void save(long offset,
                 int spos,
                 byte[] src,
                 int length)
          throws java.io.IOException
Save data to current content (char array). All offsets and lengths must be

Specified by:
save in class Content
Parameters:
offset -
spos -
src -
length -
Throws:
java.io.IOException

canReload

public boolean canReload()
Description copied from class: Content
Determine if data may be reloaded or not. For example: data from InputStream cannot be reloaded, however if content uses file or memory based cache then it is possible to reload data.

Specified by:
canReload in class Content
Returns:
true if data can be reloaded.

length

public long length()
            throws java.io.IOException
Description copied from class: Content
Get stream length. Not always known.

Specified by:
length in class Content
Returns:
Throws:
java.io.IOException

writable

public boolean writable()
Specified by:
writable in class Content