Compoze Software, Inc.

com.compoze.ebusiness
Class FileAttachment

java.lang.Object
  |
  +--com.compoze.ebusiness.FileAttachment
All Implemented Interfaces:
java.io.Serializable

public abstract class FileAttachment
extends java.lang.Object
implements java.io.Serializable

This class represents a file attachment.

See Also:
Serialized Form

Constructor Summary
  FileAttachment()
          Constructor.
protected FileAttachment(long lAttachID, java.lang.String sName, int iSize)
          Constructor.
 
Method Summary
 java.lang.String getContentType()
          Gets the MIME type of the file attachment.
 java.lang.String getFilename()
          Gets the filename of the file attachment.
 long getID()
          Gets the id of the file attachment.
abstract  java.io.InputStream getInputStream()
          Gets the input stream for the file attachment data.
 int getSize()
          Gets the size (in bytes) of the file attachment.
 java.lang.String toString()
          Returns the string representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileAttachment

public FileAttachment()
Constructor.

FileAttachment

protected FileAttachment(long lAttachID,
                         java.lang.String sName,
                         int iSize)
Constructor.
Parameters:
lAttachID - the file attachment id
sName - the filename
iSize - the size of the file attachment (in bytes)
Method Detail

getFilename

public java.lang.String getFilename()
Gets the filename of the file attachment.
Returns:
the filename

getID

public long getID()
Gets the id of the file attachment.
Returns:
the id of the file attachment

getSize

public int getSize()
Gets the size (in bytes) of the file attachment.
Returns:
the size (in bytes) or -1 if not available

getContentType

public java.lang.String getContentType()
Gets the MIME type of the file attachment. If the type can be not determined, application/octet-stream is returned.
Returns:
the MIME type of the file

getInputStream

public abstract java.io.InputStream getInputStream()
                                            throws java.io.IOException
Gets the input stream for the file attachment data.
Returns:
an input stream
Throws:
java.io.IOException - if an error occurs creating the input stream

toString

public java.lang.String toString()
Returns the string representation of this object.
Overrides:
toString in class java.lang.Object
Returns:
the string representation of this object

Compoze Software, Inc.

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.