Class FileValueImpl

    • Field Detail

      • mimeType

        protected String mimeType
      • filename

        protected String filename
      • value

        protected byte[] value
      • encoding

        protected String encoding
      • isTransient

        protected boolean isTransient
    • Method Detail

      • setMimeType

        public void setMimeType​(String mimeType)
      • setValue

        public void setValue​(byte[] bytes)
      • 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.
      • isTransient

        public boolean isTransient()
        Description copied from interface: TypedValue
        Indicator for transience of the value
        Specified by:
        isTransient in interface TypedValue
        Returns:
        isTransient
      • setTransient

        public void setTransient​(boolean isTransient)