org.camunda.bpm.engine.impl.core.variable.value
Class FileValueImpl
java.lang.Object
org.camunda.bpm.engine.impl.core.variable.value.FileValueImpl
- All Implemented Interfaces:
- Serializable, FileValue, TypedValue
public class FileValueImpl
- extends Object
- implements FileValue
- Since:
- 7.4
- Author:
- Ronny Bräunlich
- See Also:
- Serialized Form
mimeType
protected String mimeType
filename
protected String filename
value
protected byte[] value
type
protected FileValueType type
encoding
protected String encoding
FileValueImpl
public FileValueImpl(byte[] value,
FileValueType type,
String filename,
String mimeType,
String encoding)
FileValueImpl
public FileValueImpl(FileValueType type,
String filename)
getFilename
public String getFilename()
- Specified by:
getFilename in interface FileValue
getMimeType
public String getMimeType()
- Specified by:
getMimeType in interface FileValue
setMimeType
public void setMimeType(String mimeType)
setValue
public void setValue(byte[] bytes)
getValue
public InputStream getValue()
- Description copied from interface:
TypedValue
- The actual value. May be null in case the value is null.
- Specified by:
getValue in interface FileValue- Specified by:
getValue in interface TypedValue
- Returns:
- the value
getType
public ValueType getType()
- Description copied from interface:
TypedValue
- The type of the value. See ValueType for a list of built-in ValueTypes.
- Specified by:
getType in interface TypedValue
- Returns:
- the type of the value.
setEncoding
public void setEncoding(String encoding)
setEncoding
public void setEncoding(Charset encoding)
getEncodingAsCharset
public Charset getEncodingAsCharset()
- Description copied from interface:
FileValue
- Convenience 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 that
Charset.forName(String) lists.
If no encoding has been saved it will return null.
- Specified by:
getEncodingAsCharset in interface FileValue
getEncoding
public String getEncoding()
- Specified by:
getEncoding in interface FileValue
- 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
public String toString()
- Overrides:
toString in class Object
Copyright © 2015 camunda services GmbH. All rights reserved.