|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ikasan.connector.basefiletransfer.outbound.command.util.FileHandle
public class FileHandle
Simple handle class for providing lightweight access to files.
Refers to file content via an InputStream rather than ever needing
to refer to the entire content at once
Written with the intention for use within functionality that unzips files over FileTransfer
protocols whereby we do not want to hold the entire file itself in memory
at any given time, rather a handle to an IO stream
| Constructor Summary | |
|---|---|
FileHandle(java.lang.String path,
java.io.ByteArrayInputStream byteArrayInputStream)
Constructor |
|
FileHandle(java.lang.String path,
java.io.InputStream inputStream,
boolean isDirectory)
Constructor |
|
| Method Summary | |
|---|---|
java.io.InputStream |
getContentAsInputStream()
Returns the content by way of an InputStream Note that as with all InputStreams, once read, there is no way to rewind. |
java.lang.String |
getPath()
Returns the path of the file as a String |
boolean |
isDirectory()
Accessor for isDirectory flag |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FileHandle(java.lang.String path,
java.io.InputStream inputStream,
boolean isDirectory)
path - inputStream - isDirectory -
public FileHandle(java.lang.String path,
java.io.ByteArrayInputStream byteArrayInputStream)
path - byteArrayInputStream - | Method Detail |
|---|
public java.lang.String getPath()
public java.io.InputStream getContentAsInputStream()
InputStreams, once read, there is no way to rewind.
A new instance of the handle would be required.
public boolean isDirectory()
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||