org.priha.core.values
Class StreamValueImpl

java.lang.Object
  extended by org.priha.core.values.ValueImpl
      extended by org.priha.core.values.StreamValueImpl
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable<ValueImpl>, javax.jcr.Value

public class StreamValueImpl
extends ValueImpl
implements javax.jcr.Value


Field Summary
 
Fields inherited from class org.priha.core.values.ValueImpl
m_state
 
Constructor Summary
StreamValueImpl(BinarySource source)
           
StreamValueImpl(java.io.InputStream in)
           
StreamValueImpl(java.lang.String value)
           
StreamValueImpl(ValueImpl val)
           
 
Method Summary
 boolean getBoolean()
           
 java.util.Calendar getDate()
           
 double getDouble()
           
 long getLength()
           
 long getLong()
           
 java.io.InputStream getStream()
          By default, returns the inputstream of the String representation.
 java.lang.String getString()
           
 int getType()
           
 
Methods inherited from class org.priha.core.values.ValueImpl
checkStream, checkValue, compareTo, equals, toString, valueAsString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StreamValueImpl

public StreamValueImpl(ValueImpl val)
                throws java.lang.IllegalStateException,
                       javax.jcr.RepositoryException
Throws:
java.lang.IllegalStateException
javax.jcr.RepositoryException

StreamValueImpl

public StreamValueImpl(java.io.InputStream in)
                throws javax.jcr.ValueFormatException
Throws:
javax.jcr.ValueFormatException

StreamValueImpl

public StreamValueImpl(BinarySource source)

StreamValueImpl

public StreamValueImpl(java.lang.String value)
                throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getType

public int getType()
Specified by:
getType in interface javax.jcr.Value

getLength

public long getLength()
               throws java.io.IOException
Throws:
java.io.IOException

getStream

public java.io.InputStream getStream()
                              throws java.lang.IllegalStateException,
                                     javax.jcr.RepositoryException
Description copied from class: ValueImpl
By default, returns the inputstream of the String representation.

Specified by:
getStream in interface javax.jcr.Value
Overrides:
getStream in class ValueImpl
Throws:
java.lang.IllegalStateException
javax.jcr.RepositoryException

getString

public java.lang.String getString()
                           throws javax.jcr.ValueFormatException
Specified by:
getString in interface javax.jcr.Value
Overrides:
getString in class ValueImpl
Throws:
javax.jcr.ValueFormatException

getDate

public java.util.Calendar getDate()
                           throws javax.jcr.ValueFormatException
Specified by:
getDate in interface javax.jcr.Value
Overrides:
getDate in class ValueImpl
Throws:
javax.jcr.ValueFormatException

getDouble

public double getDouble()
                 throws javax.jcr.ValueFormatException
Specified by:
getDouble in interface javax.jcr.Value
Overrides:
getDouble in class ValueImpl
Throws:
javax.jcr.ValueFormatException

getLong

public long getLong()
             throws javax.jcr.ValueFormatException
Specified by:
getLong in interface javax.jcr.Value
Overrides:
getLong in class ValueImpl
Throws:
javax.jcr.ValueFormatException

getBoolean

public boolean getBoolean()
                   throws javax.jcr.ValueFormatException
Specified by:
getBoolean in interface javax.jcr.Value
Overrides:
getBoolean in class ValueImpl
Throws:
javax.jcr.ValueFormatException