Class PlaceholderValue.PlaceholderUdtValue
- java.lang.Object
-
- de.aristaflow.adept2.model.datamanagement.PlaceholderValue.AbstractPlaceholderValue
-
- de.aristaflow.adept2.model.datamanagement.PlaceholderValue.PlaceholderUdtValue
-
- All Implemented Interfaces:
PlaceholderValue
,UDTValue
,TypedCloneable<PlaceholderValue.PlaceholderUdtValue>
,Closeable
,Serializable
,AutoCloseable
,Cloneable
- Enclosing interface:
- PlaceholderValue
public static final class PlaceholderValue.PlaceholderUdtValue extends PlaceholderValue.AbstractPlaceholderValue implements UDTValue, TypedCloneable<PlaceholderValue.PlaceholderUdtValue>
This class implements thePlaceholderValue
for a value ofProcessConstants.AdeptDataType.USERDEFINED
type.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.aristaflow.adept2.model.datamanagement.PlaceholderValue
PlaceholderValue.AbstractPlaceholderValue, PlaceholderValue.PlaceholderCharSequence, PlaceholderValue.PlaceholderUdtValue
-
-
Field Summary
-
Fields inherited from interface de.aristaflow.adept2.model.datamanagement.PlaceholderValue
STRING_VALUE_PLACEHOLDER, UDT_NAME, UDT_VALUE_PLACEHOLDER
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PlaceholderValue.PlaceholderUdtValue
clone()
Clones thisUDTValue
in case it isCloneable
, otherwise aCloneNotSupportedException
will be thrown (which is what this default implementation does).void
close()
byte[]
getBytes()
Gets the value as a byte array of this user-defined data type.InputStream
getInputStream()
Gets the value as anInputStream
of this user-defined data type.Long
getSize()
Gets the size of this UDT value if it is known.String
getUserDefinedType()
Gets the name (a string) of the user-defined type of this value.byte[]
getValueAsArray()
Gets the value as a byte array of this user-defined data type.InputStream
getValueAsStream()
Gets the value as anInputStream
of this user-defined data type.-
Methods inherited from class de.aristaflow.adept2.model.datamanagement.PlaceholderValue.AbstractPlaceholderValue
equals, getDataType, hashCode, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.aristaflow.adept2.model.datamanagement.UDTValue
getContentString, getSize, isEmpty
-
-
-
-
Method Detail
-
getUserDefinedType
public String getUserDefinedType()
Description copied from interface:UDTValue
Gets the name (a string) of the user-defined type of this value.- Specified by:
getUserDefinedType
in interfaceUDTValue
- Returns:
- The name of the user-defined data type of this value.
-
getValueAsStream
public InputStream getValueAsStream()
Description copied from interface:UDTValue
Gets the value as anInputStream
of this user-defined data type.
You have to close the stream after usage.- Specified by:
getValueAsStream
in interfaceUDTValue
- Returns:
- The value of a (this) user-defined data type as an
InputStream
. The caller is responsible for closing.
-
getInputStream
public InputStream getInputStream()
Description copied from interface:UDTValue
Gets the value as anInputStream
of this user-defined data type.
You have to close the stream after usage. Usually you should notUDTValue.close()
thisUDTValue
before all created input streams have been consumed. Implementations may deviate so that closing theUDTValue
does not affect the created input streams.- Specified by:
getInputStream
in interfaceUDTValue
- Returns:
- The value of a (this) user-defined data type as an
InputStream
. The caller is responsible for closing.
-
getValueAsArray
public byte[] getValueAsArray()
Description copied from interface:UDTValue
Gets the value as a byte array of this user-defined data type.- Specified by:
getValueAsArray
in interfaceUDTValue
- Returns:
- The value of a (this) user-defined data type as an array of bytes.
-
getSize
public Long getSize()
Description copied from interface:UDTValue
Gets the size of this UDT value if it is known. For instance, if the content stems from a stream and the stream is not read yet, the size cannot be determined andnull
will be returned.
-
getBytes
public byte[] getBytes()
Description copied from interface:UDTValue
Gets the value as a byte array of this user-defined data type.
-
close
public void close()
-
clone
public PlaceholderValue.PlaceholderUdtValue clone()
Description copied from interface:UDTValue
Clones thisUDTValue
in case it isCloneable
, otherwise aCloneNotSupportedException
will be thrown (which is what this default implementation does). Subclasses should provide a corresponding implementation and also extendCloneable
. Those which do not, should forward to this default implementation.- Specified by:
clone
in interfaceTypedCloneable<PlaceholderValue.PlaceholderUdtValue>
- Specified by:
clone
in interfaceUDTValue
- Overrides:
clone
in classObject
- Returns:
- A clone of this
UDTValue
instance.
-
-