org.jboss.shotoku.common.content
Class FileNodeContent

java.lang.Object
  extended by org.jboss.shotoku.common.content.NodeContent
      extended by org.jboss.shotoku.common.content.FileNodeContent

public class FileNodeContent
extends NodeContent

A subclass of NodeContent, which reads content from a given file, if the content is unchanged (so on first content set, this will start behaving like an ordinary NodeContent).

Author:
Adam Warski (adamw@aster.pl)

Constructor Summary
FileNodeContent(java.io.File file)
           
 
Method Summary
 byte[] asByteArray()
           
 java.io.InputStream asInputStream()
           
 java.lang.String asString()
           
 long getLength()
           
 
Methods inherited from class org.jboss.shotoku.common.content.NodeContent
copyFrom, copyToFile, finalize, getChanged, getOutputStream, isLarge, markUnchanged, setContent, setContent, setContent
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileNodeContent

public FileNodeContent(java.io.File file)
Method Detail

asByteArray

public byte[] asByteArray()
Overrides:
asByteArray in class NodeContent

asInputStream

public java.io.InputStream asInputStream()
Overrides:
asInputStream in class NodeContent

asString

public java.lang.String asString()
Overrides:
asString in class NodeContent

getLength

public long getLength()
Overrides:
getLength in class NodeContent


Copyright © -2006 . All Rights Reserved.