|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.value.ValueHelper
public class ValueHelper
The ValueHelper class provides several Value
related utility methods.
| Method Summary | |
|---|---|
static javax.jcr.Value[] |
convert(java.io.InputStream[] srcValues,
int targetType,
javax.jcr.ValueFactory factory)
|
static javax.jcr.Value |
convert(java.io.InputStream srcValue,
int targetType)
Deprecated. Use convert(InputStream, int, ValueFactory) instead. |
static javax.jcr.Value |
convert(java.io.InputStream srcValue,
int targetType,
javax.jcr.ValueFactory factory)
|
static javax.jcr.Value[] |
convert(java.lang.String[] srcValues,
int targetType)
Deprecated. Use convert(String[], int, ValueFactory) instead. |
static javax.jcr.Value[] |
convert(java.lang.String[] srcValues,
int targetType,
javax.jcr.ValueFactory factory)
Same as convert(String[], int, ValueFactory) using
ValueFactoryImpl. |
static javax.jcr.Value |
convert(java.lang.String srcValue,
int targetType)
Deprecated. Use convert(String, int, ValueFactory) instead. |
static javax.jcr.Value |
convert(java.lang.String srcValue,
int targetType,
javax.jcr.ValueFactory factory)
|
static javax.jcr.Value[] |
convert(javax.jcr.Value[] srcValues,
int targetType)
Deprecated. Use convert(Value[], int, ValueFactory) instead. |
static javax.jcr.Value[] |
convert(javax.jcr.Value[] srcValues,
int targetType,
javax.jcr.ValueFactory factory)
|
static javax.jcr.Value |
convert(javax.jcr.Value srcValue,
int targetType)
Deprecated. Use convert(Value, int, ValueFactory) instead. |
static javax.jcr.Value |
convert(javax.jcr.Value srcValue,
int targetType,
javax.jcr.ValueFactory factory)
Converts the given value to a value of the specified target type. |
static javax.jcr.Value |
copy(javax.jcr.Value srcValue)
Deprecated. Use copy(Value, ValueFactory) instead. |
static javax.jcr.Value[] |
copy(javax.jcr.Value[] srcValues)
Deprecated. Use copy(Value[], ValueFactory) instead. |
static javax.jcr.Value[] |
copy(javax.jcr.Value[] srcValues,
javax.jcr.ValueFactory factory)
|
static javax.jcr.Value |
copy(javax.jcr.Value srcValue,
javax.jcr.ValueFactory factory)
|
static javax.jcr.Value |
deserialize(java.io.Reader reader,
int type,
boolean decodeBlanks)
Deprecated. Use deserialize(Reader, int, boolean, ValueFactory)
instead. |
static javax.jcr.Value |
deserialize(java.io.Reader reader,
int type,
boolean decodeBlanks,
javax.jcr.ValueFactory factory)
Deserializes the string data read from the given reader to a Value of the given type. |
static javax.jcr.Value |
deserialize(java.lang.String value,
int type,
boolean decodeBlanks)
Deprecated. Use deserialize(String, int, boolean, ValueFactory)
instead. |
static javax.jcr.Value |
deserialize(java.lang.String value,
int type,
boolean decodeBlanks,
javax.jcr.ValueFactory factory)
Deserializes the given string to a Value of the given type. |
static java.lang.String |
serialize(javax.jcr.Value value,
boolean encodeBlanks)
Serializes the given value to a String. |
static void |
serialize(javax.jcr.Value value,
boolean encodeBlanks,
boolean enforceBase64,
java.io.Writer writer)
Outputs the serialized value to a Writer. |
static void |
serialize(javax.jcr.Value value,
boolean encodeBlanks,
java.io.Writer writer)
Deprecated. use serialize(Value, boolean, boolean, Writer) instead |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static javax.jcr.Value convert(java.lang.String srcValue,
int targetType)
throws javax.jcr.ValueFormatException,
java.lang.IllegalArgumentException
convert(String, int, ValueFactory) instead.
convert(String, int, ValueFactory) using
ValueFactoryImpl.
srcValue - targetType -
javax.jcr.ValueFormatException
java.lang.IllegalArgumentExceptionconvert(Value, int, ValueFactory)
public static javax.jcr.Value convert(java.lang.String srcValue,
int targetType,
javax.jcr.ValueFactory factory)
throws javax.jcr.ValueFormatException,
java.lang.IllegalArgumentException
srcValue - targetType - factory -
javax.jcr.ValueFormatException
java.lang.IllegalArgumentExceptionconvert(Value, int, ValueFactory)
public static javax.jcr.Value convert(java.io.InputStream srcValue,
int targetType)
throws javax.jcr.ValueFormatException,
java.lang.IllegalArgumentException
convert(InputStream, int, ValueFactory) instead.
convert(InputStream, int, ValueFactory) using
ValueFactoryImpl.
srcValue - targetType -
javax.jcr.ValueFormatException
java.lang.IllegalArgumentException
public static javax.jcr.Value convert(java.io.InputStream srcValue,
int targetType,
javax.jcr.ValueFactory factory)
throws javax.jcr.ValueFormatException,
java.lang.IllegalArgumentException
srcValue - targetType - factory -
javax.jcr.ValueFormatException
java.lang.IllegalArgumentException
public static javax.jcr.Value[] convert(java.lang.String[] srcValues,
int targetType)
throws javax.jcr.ValueFormatException,
java.lang.IllegalArgumentException
convert(String[], int, ValueFactory) instead.
convert(String[], int, ValueFactory) using
ValueFactoryImpl.
srcValues - targetType -
javax.jcr.ValueFormatException
java.lang.IllegalArgumentExceptionconvert(Value, int, ValueFactory)
public static javax.jcr.Value[] convert(java.lang.String[] srcValues,
int targetType,
javax.jcr.ValueFactory factory)
throws javax.jcr.ValueFormatException,
java.lang.IllegalArgumentException
convert(String[], int, ValueFactory) using
ValueFactoryImpl.
srcValues - targetType -
javax.jcr.ValueFormatException
java.lang.IllegalArgumentExceptionconvert(Value, int, ValueFactory)
public static javax.jcr.Value[] convert(java.io.InputStream[] srcValues,
int targetType,
javax.jcr.ValueFactory factory)
throws javax.jcr.ValueFormatException,
java.lang.IllegalArgumentException
srcValues - targetType -
javax.jcr.ValueFormatException
java.lang.IllegalArgumentExceptionconvert(Value, int, ValueFactory)
public static javax.jcr.Value[] convert(javax.jcr.Value[] srcValues,
int targetType)
throws javax.jcr.ValueFormatException,
java.lang.IllegalArgumentException
convert(Value[], int, ValueFactory) instead.
convert(Value[], int, ValueFactory) using
ValueFactoryImpl.
srcValues - targetType -
javax.jcr.ValueFormatException
java.lang.IllegalArgumentExceptionconvert(Value, int, ValueFactory)
public static javax.jcr.Value[] convert(javax.jcr.Value[] srcValues,
int targetType,
javax.jcr.ValueFactory factory)
throws javax.jcr.ValueFormatException,
java.lang.IllegalArgumentException
srcValues - targetType - factory -
javax.jcr.ValueFormatException
java.lang.IllegalArgumentExceptionconvert(Value, int, ValueFactory)
public static javax.jcr.Value convert(javax.jcr.Value srcValue,
int targetType)
throws javax.jcr.ValueFormatException,
java.lang.IllegalStateException,
java.lang.IllegalArgumentException
convert(Value, int, ValueFactory) instead.
convert(Value, int, ValueFactory) using
ValueFactoryImpl.
srcValue - targetType -
javax.jcr.ValueFormatException
java.lang.IllegalStateException
java.lang.IllegalArgumentExceptionconvert(Value, int, ValueFactory)
public static javax.jcr.Value convert(javax.jcr.Value srcValue,
int targetType,
javax.jcr.ValueFactory factory)
throws javax.jcr.ValueFormatException,
java.lang.IllegalStateException,
java.lang.IllegalArgumentException
srcValue - targetType - factory -
javax.jcr.ValueFormatException
java.lang.IllegalStateException
java.lang.IllegalArgumentException
public static javax.jcr.Value copy(javax.jcr.Value srcValue)
throws java.lang.IllegalStateException
copy(Value, ValueFactory) instead.
copy(Value, ValueFactory) using ValueFactoryImpl.
srcValue -
java.lang.IllegalStateException
public static javax.jcr.Value copy(javax.jcr.Value srcValue,
javax.jcr.ValueFactory factory)
throws java.lang.IllegalStateException
srcValue - factory -
java.lang.IllegalStateException
public static javax.jcr.Value[] copy(javax.jcr.Value[] srcValues)
throws java.lang.IllegalStateException
copy(Value[], ValueFactory) instead.
copy(Value[], ValueFactory) using ValueFactoryImpl.
srcValues -
java.lang.IllegalStateException
public static javax.jcr.Value[] copy(javax.jcr.Value[] srcValues,
javax.jcr.ValueFactory factory)
throws java.lang.IllegalStateException
srcValues - factory -
java.lang.IllegalStateException
public static java.lang.String serialize(javax.jcr.Value value,
boolean encodeBlanks)
throws java.lang.IllegalStateException,
javax.jcr.RepositoryException
String. The serialization
format is the same as used by Document & System View XML, i.e.
binary values will be Base64-encoded whereas for all others
Value.getString() will be used.
value - the value to be serializedencodeBlanks - if true space characters will be encoded
as "_x0020_" within he output string.
java.lang.IllegalStateException - if the given value is in an illegal state
javax.jcr.RepositoryException - if an error occured during the serialization.
public static void serialize(javax.jcr.Value value,
boolean encodeBlanks,
java.io.Writer writer)
throws java.lang.IllegalStateException,
java.io.IOException,
javax.jcr.RepositoryException
serialize(Value, boolean, boolean, Writer) instead
java.lang.IllegalStateException
java.io.IOException
javax.jcr.RepositoryException
public static void serialize(javax.jcr.Value value,
boolean encodeBlanks,
boolean enforceBase64,
java.io.Writer writer)
throws java.lang.IllegalStateException,
java.io.IOException,
javax.jcr.RepositoryException
Writer. The serialization
format is the same as used by Document & System View XML, i.e.
binary values will be Base64-encoded whereas for all others
Value.getString() will be used for serialization.
value - the value to be serializedencodeBlanks - if true space characters will be encoded
as "_x0020_" within he output string.enforceBase64 - if true, base64 encoding will always be usedwriter - writer to output the encoded data
java.lang.IllegalStateException - if the given value is in an illegal state
java.io.IOException - if an i/o error occured during the
serialization
javax.jcr.RepositoryException - if an error occured during the serialization.
public static javax.jcr.Value deserialize(java.lang.String value,
int type,
boolean decodeBlanks)
throws javax.jcr.ValueFormatException,
javax.jcr.RepositoryException
deserialize(String, int, boolean, ValueFactory)
instead.
Value of the given type.
Same as deserialize(String, int, boolean, ValueFactory) using
ValueFactoryImpl.
value - string to be deserializedtype - type of valuedecodeBlanks - if true "_x0020_"
character sequences will be decoded to single space
characters each.
Value
javax.jcr.ValueFormatException - if the string data is not of the required
format
javax.jcr.RepositoryException - if an error occured during the
deserialization.
public static javax.jcr.Value deserialize(java.lang.String value,
int type,
boolean decodeBlanks,
javax.jcr.ValueFactory factory)
throws javax.jcr.ValueFormatException,
javax.jcr.RepositoryException
Value of the given type.
value - string to be deserializedtype - type of valuedecodeBlanks - if true "_x0020_"
character sequences will be decoded to single space
characters each.factory - ValueFactory used to build the Value object.
Value
javax.jcr.ValueFormatException - if the string data is not of the required
format
javax.jcr.RepositoryException - if an error occured during the
deserialization.
public static javax.jcr.Value deserialize(java.io.Reader reader,
int type,
boolean decodeBlanks)
throws java.io.IOException,
javax.jcr.ValueFormatException,
javax.jcr.RepositoryException
deserialize(Reader, int, boolean, ValueFactory)
instead.
Value of the given type. Same as
deserialize(Reader, int, boolean, ValueFactory) using
ValueFactoryImpl.
reader - reader for the string data to be deserializedtype - type of valuedecodeBlanks - if true "_x0020_"
character sequences will be decoded to single space
characters each.
Value
java.io.IOException - if an i/o error occured during the
serialization
javax.jcr.ValueFormatException - if the string data is not of the required
format
javax.jcr.RepositoryException - if an error occured during the
deserialization.
public static javax.jcr.Value deserialize(java.io.Reader reader,
int type,
boolean decodeBlanks,
javax.jcr.ValueFactory factory)
throws java.io.IOException,
javax.jcr.ValueFormatException,
javax.jcr.RepositoryException
Value of the given type.
reader - reader for the string data to be deserializedtype - type of valuedecodeBlanks - if true "_x0020_"
character sequences will be decoded to single space
characters each.factory - ValueFactory used to build the Value object.
Value
java.io.IOException - if an i/o error occured during the
serialization
javax.jcr.ValueFormatException - if the string data is not of the required
format
javax.jcr.RepositoryException - if an error occured during the
deserialization.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||