Class FileAccessor

java.lang.Object
java.util.Observable
org.apache.axiom.attachments.lifecycle.impl.FileAccessor

public class FileAccessor extends Observable
FileAccessor wraps the attachment temp file. It is created from PartOnFile. The idea behind wrapping the file is to give rumtime an ability to track when the file is accessed with streams or data handler and accordingly trigger events to handle the the files lifecycle.
  • Constructor Details

  • Method Details

    • getDataHandler

      public DataHandler getDataHandler(String contentType) throws javax.mail.MessagingException
      Throws:
      javax.mail.MessagingException
    • getFileName

      public String getFileName() throws javax.mail.MessagingException
      Throws:
      javax.mail.MessagingException
    • getInputStream

      public InputStream getInputStream() throws IOException, javax.mail.MessagingException
      Throws:
      IOException
      javax.mail.MessagingException
    • getOutputStream

      public OutputStream getOutputStream() throws FileNotFoundException
      Throws:
      FileNotFoundException
    • getSize

      public long getSize()
    • getFile

      public File getFile()
    • setFile

      public void setFile(File file)
    • getAccessCount

      public int getAccessCount()