org.apache.slide.content
Class NodeRevisionContent

java.lang.Object
  extended byorg.apache.slide.content.NodeRevisionContent
All Implemented Interfaces:
java.io.Serializable

public final class NodeRevisionContent
extends java.lang.Object
implements java.io.Serializable

Encapsultes the contents of a revision.

Version:
$Revision: 1.17 $
See Also:
Serialized Form

Constructor Summary
NodeRevisionContent()
           
 
Method Summary
 long bufferContent(java.io.InputStream is)
           
 char[] getContent()
          Content accessor.
 byte[] getContentBytes()
          Content accessor.
static byte[] read(java.io.InputStream inputStream)
          Read the data from the stream and return the result in a byte array.
static char[] read(java.io.Reader reader)
          Read the data from the reader and return the result in a char array.
 java.io.Reader readContent()
          Content accessor.
 void setContent(byte[] contentBytes)
          Content mutator.
 void setContent(char[] content)
          Content mutator.
 void setContent(java.io.InputStream inputStream)
          Content mutator.
 void setContent(java.io.Reader reader)
          Content mutator.
 java.io.InputStream streamContent()
          Content accessor.
 void validate()
          Validate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeRevisionContent

public NodeRevisionContent()
Method Detail

getContent

public char[] getContent()
Content accessor.

Returns:
char[] Content

getContentBytes

public byte[] getContentBytes()
Content accessor.

Returns:
char[] Content

readContent

public java.io.Reader readContent()
                           throws java.io.IOException
Content accessor.

Returns:
Reader
Throws:
java.io.IOException

streamContent

public java.io.InputStream streamContent()
                                  throws java.io.IOException
Content accessor.

Returns:
InputStream
Throws:
java.io.IOException

setContent

public void setContent(byte[] contentBytes)
Content mutator.

Parameters:
contentBytes - New content

setContent

public void setContent(char[] content)
Content mutator.

Parameters:
content - New content

setContent

public void setContent(java.io.Reader reader)
Content mutator.

Parameters:
reader - New reader

setContent

public void setContent(java.io.InputStream inputStream)
Content mutator.

Parameters:
inputStream - New input stream

bufferContent

public long bufferContent(java.io.InputStream is)
                   throws java.io.IOException
Throws:
java.io.IOException

validate

public void validate()
Validate.


read

public static byte[] read(java.io.InputStream inputStream)
                   throws java.io.IOException
Read the data from the stream and return the result in a byte array. Return null in case of an error.

Throws:
java.io.IOException

read

public static char[] read(java.io.Reader reader)
                   throws java.io.IOException
Read the data from the reader and return the result in a char array. Return null in case of an error.

Throws:
java.io.IOException