org.apache.slide.content
Class NodeRevisionContent

java.lang.Object
  |
  +--org.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.8 $
Author:
Remy Maucherat, Juergen Pill
See Also:
Serialized Form

Constructor Summary
NodeRevisionContent()
           
 
Method Summary
 char[] getContent()
          Content accessor.
 byte[] getContentBytes()
          Content accessor.
 java.io.Reader readContent()
          Content accessor.
static byte[] readFromStream(java.io.InputStream inputStream)
          Read the data from the stream and return the result in a byte array.
 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

streamContent

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

setContent

public void setContent(byte[] contentBytes)
Content mutator.
Parameters:
content - 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

validate

public void validate()
Validate.

readFromStream

public static byte[] readFromStream(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.