Class FileValueImpl
java.lang.Object
org.camunda.bpm.engine.variable.impl.value.FileValueImpl
- All Implemented Interfaces:
Serializable,FileValue,TypedValue
- Direct Known Subclasses:
DeferredFileValueImpl
- Since:
- 7.4
- Author:
- Ronny Bräunlich
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected Stringprotected booleanprotected Stringprotected FileValueTypeprotected byte[] -
Constructor Summary
ConstructorsConstructorDescriptionFileValueImpl(byte[] value, FileValueType type, String filename, String mimeType, String encoding) FileValueImpl(FileValueType type, String filename) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Get the byte array directly without wrapping it inside a stream to evade not needed wrapping.Convenience method to save the transformation.getType()The type of the value.getValue()The actual value.booleanIndicator for transience of the valuevoidsetEncoding(String encoding) voidsetEncoding(Charset encoding) voidsetMimeType(String mimeType) voidsetTransient(boolean isTransient) voidsetValue(byte[] bytes) toString()
-
Field Details
-
mimeType
-
filename
-
value
protected byte[] value -
type
-
encoding
-
isTransient
protected boolean isTransient
-
-
Constructor Details
-
FileValueImpl
public FileValueImpl(byte[] value, FileValueType type, String filename, String mimeType, String encoding) -
FileValueImpl
-
-
Method Details
-
getFilename
- Specified by:
getFilenamein interfaceFileValue
-
getMimeType
- Specified by:
getMimeTypein interfaceFileValue
-
setMimeType
-
setValue
public void setValue(byte[] bytes) -
getValue
Description copied from interface:TypedValueThe actual value. May be null in case the value is null.- Specified by:
getValuein interfaceFileValue- Specified by:
getValuein interfaceTypedValue- Returns:
- the value
-
getType
Description copied from interface:TypedValueThe type of the value. See ValueType for a list of built-in ValueTypes.- Specified by:
getTypein interfaceTypedValue- Returns:
- the type of the value.
-
setEncoding
-
setEncoding
-
getEncodingAsCharset
Description copied from interface:FileValueConvenience method to save the transformation. This method will perform no check if the saved encoding is known to the JVM and therefore could throw every exception thatCharset.forName(String)lists.If no encoding has been saved it will return null.
- Specified by:
getEncodingAsCharsetin interfaceFileValue
-
getEncoding
- Specified by:
getEncodingin interfaceFileValue- Returns:
- the saved encoding or null if none has been saved
-
getByteArray
public byte[] getByteArray()Get the byte array directly without wrapping it inside a stream to evade not needed wrapping. This method is intended for the internal API, which needs the byte array anyways. -
toString
-
isTransient
public boolean isTransient()Description copied from interface:TypedValueIndicator for transience of the value- Specified by:
isTransientin interfaceTypedValue- Returns:
- isTransient
-
setTransient
public void setTransient(boolean isTransient)
-