Class FileValueImpl
- java.lang.Object
- 
- org.camunda.bpm.engine.variable.impl.value.FileValueImpl
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- FileValue,- TypedValue
 - Direct Known Subclasses:
- DeferredFileValueImpl
 
 public class FileValueImpl extends java.lang.Object implements FileValue - Since:
- 7.4
- Author:
- Ronny Bräunlich
- See Also:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.lang.Stringencodingprotected java.lang.Stringfilenameprotected booleanisTransientprotected java.lang.StringmimeTypeprotected FileValueTypetypeprotected byte[]value
 - 
Constructor SummaryConstructors Constructor Description FileValueImpl(byte[] value, FileValueType type, java.lang.String filename, java.lang.String mimeType, java.lang.String encoding)FileValueImpl(FileValueType type, java.lang.String filename)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getByteArray()Get the byte array directly without wrapping it inside a stream to evade not needed wrapping.java.lang.StringgetEncoding()java.nio.charset.CharsetgetEncodingAsCharset()Convenience method to save the transformation.java.lang.StringgetFilename()java.lang.StringgetMimeType()ValueTypegetType()The type of the value.java.io.InputStreamgetValue()The actual value.booleanisTransient()Indicator for transience of the valuevoidsetEncoding(java.lang.String encoding)voidsetEncoding(java.nio.charset.Charset encoding)voidsetMimeType(java.lang.String mimeType)voidsetTransient(boolean isTransient)voidsetValue(byte[] bytes)java.lang.StringtoString()
 
- 
- 
- 
Field Detail- 
mimeTypeprotected java.lang.String mimeType 
 - 
filenameprotected java.lang.String filename 
 - 
valueprotected byte[] value 
 - 
typeprotected FileValueType type 
 - 
encodingprotected java.lang.String encoding 
 - 
isTransientprotected boolean isTransient 
 
- 
 - 
Constructor Detail- 
FileValueImplpublic FileValueImpl(byte[] value, FileValueType type, java.lang.String filename, java.lang.String mimeType, java.lang.String encoding)
 - 
FileValueImplpublic FileValueImpl(FileValueType type, java.lang.String filename) 
 
- 
 - 
Method Detail- 
getFilenamepublic java.lang.String getFilename() - Specified by:
- getFilenamein interface- FileValue
 
 - 
getMimeTypepublic java.lang.String getMimeType() - Specified by:
- getMimeTypein interface- FileValue
 
 - 
setMimeTypepublic void setMimeType(java.lang.String mimeType) 
 - 
setValuepublic void setValue(byte[] bytes) 
 - 
getValuepublic java.io.InputStream getValue() Description copied from interface:TypedValueThe actual value. May be null in case the value is null.- Specified by:
- getValuein interface- FileValue
- Specified by:
- getValuein interface- TypedValue
- Returns:
- the value
 
 - 
getTypepublic ValueType getType() Description copied from interface:TypedValueThe type of the value. See ValueType for a list of built-in ValueTypes.- Specified by:
- getTypein interface- TypedValue
- Returns:
- the type of the value.
 
 - 
setEncodingpublic void setEncoding(java.lang.String encoding) 
 - 
setEncodingpublic void setEncoding(java.nio.charset.Charset encoding) 
 - 
getEncodingAsCharsetpublic java.nio.charset.Charset 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 interface- FileValue
 
 - 
getEncodingpublic java.lang.String getEncoding() - Specified by:
- getEncodingin interface- FileValue
- Returns:
- the saved encoding or null if none has been saved
 
 - 
getByteArraypublic 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.
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
isTransientpublic boolean isTransient() Description copied from interface:TypedValueIndicator for transience of the value- Specified by:
- isTransientin interface- TypedValue
- Returns:
- isTransient
 
 - 
setTransientpublic void setTransient(boolean isTransient) 
 
- 
 
-