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>

public class StreamValueImpl
extends ValueImpl


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()
           
 long getSize()
          Returns the approximate size of this object in bytes.
 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,
                       RepositoryException
Throws:
java.lang.IllegalStateException
RepositoryException

StreamValueImpl

public StreamValueImpl(java.io.InputStream in)
                throws ValueFormatException
Throws:
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()

getLength

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

getStream

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

Overrides:
getStream in class ValueImpl
Throws:
java.lang.IllegalStateException
RepositoryException

getString

public java.lang.String getString()
                           throws ValueFormatException
Overrides:
getString in class ValueImpl
Throws:
ValueFormatException

getDate

public java.util.Calendar getDate()
                           throws ValueFormatException
Overrides:
getDate in class ValueImpl
Throws:
ValueFormatException

getDouble

public double getDouble()
                 throws ValueFormatException
Overrides:
getDouble in class ValueImpl
Throws:
ValueFormatException

getLong

public long getLong()
             throws ValueFormatException
Overrides:
getLong in class ValueImpl
Throws:
ValueFormatException

getBoolean

public boolean getBoolean()
                   throws ValueFormatException
Overrides:
getBoolean in class ValueImpl
Throws:
ValueFormatException

getSize

public long getSize()
Description copied from class: ValueImpl
Returns the approximate size of this object in bytes. If not determinable, returns -1;

Overrides:
getSize in class ValueImpl
Returns: