|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nnsoft.shs.core.io.FileResponseBodyWriter
public final class FileResponseBodyWriter
Generates a body response from a File.
| Constructor Summary | |
|---|---|
FileResponseBodyWriter(File toBeTransfered)
Creates a new ResponseBodyWriter given the file has to be transferred to the body response. |
|
| Method Summary | |
|---|---|
String |
contentType()
Returns the mime type of the streamed response. |
long |
getContentLength()
Returns the body content length if known, -1 otherwise. |
void |
write(WritableByteChannel target)
Generates the body response into the target output stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileResponseBodyWriter(File toBeTransfered)
toBeTransfered - the file has to be transferred to the body response.| Method Detail |
|---|
public long getContentLength()
getContentLength in interface ResponseBodyWriterpublic String contentType()
contentType in interface ResponseBodyWriter
public void write(WritableByteChannel target)
throws IOException
write in interface ResponseBodyWritertarget - the target output where body has to be generated
IOException - is any error occurs during the body generation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||