|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.rad.io.FileHandle
public class FileHandle
FileHandle handles data in memory or in the file system. The Bean standard guarantees with the properties "fileName" and "gZIPContent" that it can be transported with a connection. For compatibility reasons is the FileHandle also Serializable.
| Constructor Summary | |
|---|---|
FileHandle()
Constructs a new FileHandle. |
|
FileHandle(File pContent)
Constructs a new FileHandle. |
|
FileHandle(String pAbsolutePath)
Constructs a new FileHandle. |
|
FileHandle(String pFileName,
byte[] pContent)
Constructs a new memory file handle. |
|
FileHandle(String pFileName,
InputStream pContent)
Constructs a new memory file handle. |
|
| Method Summary | |
|---|---|
File |
getFile()
Gets the file that was set as content. |
String |
getFileName()
Gets the file name of this file handle. |
byte[] |
getGZIPContent()
Gets the gzipped content. |
InputStream |
getInputStream()
Gets the InputStream of this file handle. |
long |
getLength()
Gets the length of the InputStream in bytes |
OutputStream |
getOutputStream()
Resets the content to zero, and gets an OutputStresm to write the content. |
void |
setContent(byte[] pContent)
Sets a new content with a byte array. |
void |
setContent(File pContent)
Sets a new content with a File. |
void |
setContent(InputStream pContent)
Sets a new content with a InputStream. |
void |
setFileName(String pFileName)
Sets the file name of this file handle. |
void |
setGZIPContent(byte[] pGZIPContent)
Sets the gzipped content. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileHandle()
public FileHandle(String pAbsolutePath)
pAbsolutePath - the absolute path of the file.
public FileHandle(String pFileName,
byte[] pContent)
throws IOException
pFileName - the file name.pContent - the content.
IOException - if an IOException occurs.
public FileHandle(String pFileName,
InputStream pContent)
throws IOException
pFileName - the file name.pContent - the content.
IOException - if an IOException occurs.
public FileHandle(File pContent)
throws IOException
pContent - the content.
IOException - if an IOException occurs.| Method Detail |
|---|
public String getFileName()
getFileName in interface IFileHandle
public InputStream getInputStream()
throws IOException
getInputStream in interface IFileHandleIOException - if an exception occurs.
public long getLength()
throws IOException
getLength in interface IFileHandleIOException - if an exception occurs.public void setFileName(String pFileName)
pFileName - the file name of this file handle.public File getFile()
public byte[] getGZIPContent()
throws IOException
IOException - if an IOException occurs.
public void setGZIPContent(byte[] pGZIPContent)
throws IOException
pGZIPContent - the gzipped content.
IOException - if an IOException occurs.
public OutputStream getOutputStream()
throws IOException
IOException - if an IOException occurs.
public void setContent(byte[] pContent)
throws IOException
pContent - the new content.
IOException - if an IOException occurs.
public void setContent(InputStream pContent)
throws IOException
pContent - the new content.
IOException - if an IOException occurs.
public void setContent(File pContent)
throws IOException
pContent - the new content.
IOException - if an IOException occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||