Class DefaultFileContent

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Closes all resources used by the content, including all streams, readers and writers.
      java.lang.Object getAttribute​(java.lang.String attrName)
      Gets the value of an attribute.
      java.lang.String[] getAttributeNames()
      Lists the attributes of this file.
      java.util.Map<java.lang.String,​java.lang.Object> getAttributes()
      Returns a read-only map of this file's attributes.
      java.security.cert.Certificate[] getCertificates()
      Returns the certificates used to sign this file.
      FileContentInfo getContentInfo()
      Gets the FileContentInfo which describes the content-type, content-encoding
      FileObject getFile()
      Returns the file that this is the content of.
      java.io.InputStream getInputStream()
      Returns an input stream for reading the content.
      long getLastModifiedTime()
      Returns the last-modified timestamp.
      java.io.OutputStream getOutputStream()
      Returns an output stream for writing the content.
      java.io.OutputStream getOutputStream​(boolean bAppend)
      Returns an output stream for writing the content in append mode.
      RandomAccessContent getRandomAccessContent​(RandomAccessMode mode)
      Returns an input/output stream to use to read and write the content of the file in an random manner.
      long getSize()
      Returns the size of the content (in bytes).
      boolean hasAttribute​(java.lang.String attrName)
      Checks if an attribute exists.
      boolean isOpen()
      Checks if a input and/or output stream is open.
      boolean isOpenGlobal()
      Checks if an input or output stream is open.
      void removeAttribute​(java.lang.String attrName)
      Removes an attribute.
      void resetAttributes()
      Used internally to flag situations where the file attributes should be reretrieved.
      void setAttribute​(java.lang.String attrName, java.lang.Object value)
      Sets the value of an attribute.
      void setLastModifiedTime​(long modTime)
      Sets the last-modified timestamp.
      long write​(java.io.OutputStream output)
      Writes this content to an OutputStream.
      long write​(java.io.OutputStream output, int bufferSize)
      Writes this content to an OutputStream.
      long write​(FileContent fileContent)
      Writes this content to another FileContent.
      long write​(FileObject file)
      Writes this content to another FileObject.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait