|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unido.ls5.eti.client.ByteArrayVirtualFile
public class ByteArrayVirtualFile
This is an implementation of VirtualFile
that uses a byte array
to store the data.
Constructor Summary | |
---|---|
ByteArrayVirtualFile(InputStream inputStream,
String filename)
Initializes this VirtualFile by copying the data from inputStream and storing it in an internal byte array. |
Method Summary | |
---|---|
String |
getFilename()
As the implementation is independent from real files, it must have a file name that is handled separately. |
InputStream |
getInputStream()
Retrieves an input stream to read the internal byte array |
String |
toString()
Produces a debug String that contains the virtual filename and the number of bytes stored. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ByteArrayVirtualFile(InputStream inputStream, String filename) throws IOException
inputStream
- the input stream where the data is read fromfilename
- the virtual filename
IOException
- if something during copying of the data goes wrong.Method Detail |
---|
public InputStream getInputStream()
getInputStream
in interface VirtualFile
public String getFilename()
VirtualFile
getFilename
in interface VirtualFile
VirtualFile.getFilename()
public String toString()
toString
in interface VirtualFile
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |