|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrabbit.client.FileSaver
public class FileSaver
A class to save a ResourceSource into a file. This is mostly an example of how to use the rabbit client classes.
Constructor Summary | |
---|---|
FileSaver(HttpHeader request,
ClientBase clientBase,
ClientListener listener,
ResourceSource rs,
File f)
Create a new FileSaver that will write a resource to the given file. |
Method Summary | |
---|---|
void |
bufferRead(BufferHandle bufHandle)
A buffer has been read, the buffer has been flip:ed before this call is made so position and remaining are valid. |
void |
failed(Exception cause)
Reading failed |
void |
finishedRead()
The resource have been fully transferred |
void |
timeout()
The operation timed out |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileSaver(HttpHeader request, ClientBase clientBase, ClientListener listener, ResourceSource rs, File f) throws IOException
request
- the actual requestclientBase
- the clientlistener
- the ClientListener to tell when the resource has been
fully handledrs
- the resource to savef
- where to store the resource
IOException
- if the file can not be writtenMethod Detail |
---|
public void bufferRead(BufferHandle bufHandle)
BlockListener
bufferRead
in interface BlockListener
bufHandle
- the data that was readpublic void finishedRead()
BlockListener
finishedRead
in interface BlockListener
public void failed(Exception cause)
AsyncListener
failed
in interface AsyncListener
cause
- the real reason the operation failed.public void timeout()
AsyncListener
timeout
in interface AsyncListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |