FileDocCategorySizeDatePackage
TempFile.javaAPI DocAndroid 1.5 API3281Wed May 06 22:42:46 BST 2009org.apache.james.mime4j.util

TempFile

public interface TempFile
version
$Id: TempFile.java,v 1.3 2004/10/02 12:41:11 ntherning Exp $

Fields Summary
Constructors Summary
Methods Summary
public voiddelete()
Deletes this file as soon as possible.

public java.lang.StringgetAbsolutePath()
Returns the absolute path including file name of this TempFile. The path may be null if this is an in-memory file.

return
the absolute path.

public java.io.InputStreamgetInputStream()
Gets an InputStream to read bytes from this temporary file. NOTE: The stream should NOT be wrapped in BufferedInputStream by the caller. If the implementing TempFile creates a FileInputStream or any other stream which would benefit from being buffered it's the TempFile's responsibility to wrap it.

return
the stream.
throws
IOException

public java.io.OutputStreamgetOutputStream()
Gets an OutputStream to write bytes to this temporary file. NOTE: The stream should NOT be wrapped in BufferedOutputStream by the caller. If the implementing TempFile creates a FileOutputStream or any other stream which would benefit from being buffered it's the TempFile's responsibility to wrap it.

return
the stream.
throws
IOException

public booleanisInMemory()
Determines if this is an in-memory file.

return
true if this file is currently in memory, false otherwise.

public longlength()
Gets the length of this temporary file.

return
the length.