Package overit.geocall.servlet.gate
Interface Source
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
ByteArraySource,OutputBarcode.Source
This class manages the source of a file. By using a
ConcreteGate
it is possible to download a file creating a very own personalized source
implementing this class.-
Method Summary
Modifier and TypeMethodDescriptionbooleanReturnstrueif the Source is compressible,falseotherwiseReturns the content typeReturns the entity taglongReturns the content lengthdefault voidRead the content of the passed uploaded filevoidoutput(OutputStream os) Write in the OutputStream
-
Method Details
-
getCompressible
boolean getCompressible()Returnstrueif the Source is compressible,falseotherwise- Returns:
trueif the Source is compressible,falseotherwise
-
getEntityTag
String getEntityTag()Returns the entity tag- Returns:
- The entity tag
-
getContentType
String getContentType()Returns the content type- Returns:
- The content type
-
getLength
long getLength()Returns the content length- Returns:
- The content length in byte
-
output
Write in the OutputStream- Parameters:
os- The OutputStream- Throws:
IOException- if an I/O error occurs
-
input
Read the content of the passed uploaded file- Parameters:
upFile- instance of the uploaded file that is going to be saved- Throws:
IOException- in case of any error while saving the uploaded file
-