jACOB 2.7 API Documentation.

de.tif.jacob.core.data
Class DataDocumentValue

java.lang.Object
  extended by de.tif.jacob.core.data.DataDocumentValue

public final class DataDocumentValue
extends java.lang.Object

Data document value instances could be obtained by means of

  • IDataRecord.getDocumentValue(int)
  • IDataRecord.getValue(int) for jACOB document field types.


    Field Summary
    static java.lang.String RCS_ID
              The internal revision control system id.
    static java.lang.String RCS_REV
              The internal revision control system id in short form.
     
    Method Summary
    static DataDocumentValue create(java.io.File file)
              Create a document value instance from a file instance.
    static DataDocumentValue create(java.lang.String name, byte[] content)
              Create a document value instance by means of name and binary content.
    static DataDocumentValue create(java.lang.String name, byte[] content, int len)
              Create a document value instance by means of name and binary content.
     boolean equals(java.lang.Object obj)
              Indicates whether some other object is "equal to" this one.
     byte[] getContent()
              Returns the content of this document.
     java.lang.String getName()
              Returns the name of this document.
     java.lang.String toString()
              Returns the document value as string, i.e.
     
    Methods inherited from class java.lang.Object
    getClass, hashCode, notify, notifyAll, wait, wait, wait
     

    Field Detail

    RCS_ID

    public static final transient java.lang.String RCS_ID
    The internal revision control system id.

    See Also:
    Constant Field Values

    RCS_REV

    public static final transient java.lang.String RCS_REV
    The internal revision control system id in short form.

    See Also:
    Constant Field Values
    Method Detail

    create

    public static DataDocumentValue create(java.io.File file)
                                    throws java.io.IOException
    Create a document value instance from a file instance.

    Parameters:
    file - the file instance
    Returns:
    the document value created
    Throws:
    java.io.IOException - if the content of file could not be accessed, i.e. file does not exist.

    create

    public static DataDocumentValue create(java.lang.String name,
                                           byte[] content)
    Create a document value instance by means of name and binary content.

    Parameters:
    name - the document name
    content - the binary content or null
    Returns:
    the document value created or null if name is not a valid document name.

    create

    public static DataDocumentValue create(java.lang.String name,
                                           byte[] content,
                                           int len)
    Create a document value instance by means of name and binary content.

    Parameters:
    name - the document name
    content - the binary content or null
    len - the maximum number of bytes to read from content
    Returns:
    the document value created or null if name is not a valid document name.

    getContent

    public byte[] getContent()
    Returns the content of this document.

    Attention: This method does not return a copy of the content. Therefore the returned content should not be modified.

    Note: If the document is empty, byte[0] will be returned instead of null.

    Returns:
    the document content.

    getName

    public java.lang.String getName()
    Returns the name of this document.

    Returns:
    the document name.

    equals

    public boolean equals(java.lang.Object obj)
    Indicates whether some other object is "equal to" this one.

    Different instances of this class are equal, if the document name and the content are equal as well.

    Overrides:
    equals in class java.lang.Object
    See Also:
    Object.equals(java.lang.Object)

    toString

    public java.lang.String toString()
    Returns the document value as string, i.e. "document [name]" will be returned.

    Overrides:
    toString in class java.lang.Object
    Returns:
    the key value as string

    jACOB 2.7 API Documentation.