Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter
11g Release 1 (11.1.1.4.0)
E15995-03


oracle.wcps.property
Class BlobData

java.lang.Object
  extended by oracle.wcps.property.BlobData

All Implemented Interfaces:
java.io.Serializable, PropertyValue

public class BlobData
extends java.lang.Object
implements PropertyValue, java.io.Serializable

Encapsulates a blob value.

See Also:
Serialized Form

Constructor Summary
BlobData()
          Note: This is for JAXB.
BlobData(byte[] value)
          Creates this with the given value an array of bytes.
BlobData(java.lang.Object o)
          Creates this with the byte array after serializing the given o object.
BlobData(java.io.Serializable s)
          Creates this with the byte array after serializing the given s object.
BlobData(java.lang.String value)
          Creates this with bytes converted from the UTF-8 encoded string value.

 

Method Summary
 java.util.List<PropertyValue> asList(BlobData[] ts)
          Converts the given array to list.
 boolean equals(java.lang.Object o)
           
<T> T
getObject(java.lang.Class<T> type)
          Convenience method to convert the byte array value into an object of the given type.
 byte[] getValue()
          Returns the raw value as a byte array.
 int hashCode()
           
 void setValue(byte[] value)
          Uses the given byte array value as its raw value.
 java.io.Serializable unwrap()
          Unwraps this into correct type value.
 java.io.Serializable unwrap(java.util.List<? extends PropertyValue> values, boolean isMultiValue)
          Unwraps this into correct type values.

 

Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

BlobData

public BlobData()
Note: This is for JAXB.

BlobData

public BlobData(java.lang.String value)
Creates this with bytes converted from the UTF-8 encoded string value.
Parameters:
value - a string value.

BlobData

public BlobData(byte[] value)
Creates this with the given value an array of bytes.
Parameters:
value - an array of value.

BlobData

public BlobData(java.io.Serializable s)
Creates this with the byte array after serializing the given s object.
Parameters:
s - a serializable object.

BlobData

public BlobData(java.lang.Object o)
Creates this with the byte array after serializing the given o object.
Parameters:
o - a serializable object.

Method Detail

getValue

public byte[] getValue()
Returns the raw value as a byte array.
Specified by:
getValue in interface PropertyValue
Returns:
a byte array.

setValue

public void setValue(byte[] value)
Uses the given byte array value as its raw value.
Parameters:
value - the raw value for this.

unwrap

public java.io.Serializable unwrap()
Description copied from interface: PropertyValue
Unwraps this into correct type value.
Specified by:
unwrap in interface PropertyValue
Returns:
a raw property value whose type is one of the Type enum values.

asList

public java.util.List<PropertyValue> asList(BlobData[] ts)
Converts the given array to list.
Parameters:
ts - an array of this.
Returns:
list of elements of ts.

unwrap

public java.io.Serializable unwrap(java.util.List<? extends PropertyValue> values,
                                   boolean isMultiValue)
Description copied from interface: PropertyValue
Unwraps this into correct type values. If isMultiValue is true it will convert values into an array of values.
Specified by:
unwrap in interface PropertyValue
Parameters:
values - a list of property values.
isMultiValue - if this is an array or not.
Returns:
unwrapped values.

getObject

public <T> T getObject(java.lang.Class<T> type)
Convenience method to convert the byte array value into an object of the given type.
Type Parameters:
T - type template
Parameters:
type - a class.
Returns:
an instance of <T>.

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter
11g Release 1 (11.1.1.4.0)
E15995-03


Copyright © 2009, 2011, Oracle and/or its affiliates. All rights reserved.