Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.stanfy.enroscar.rest.request.net.multipart;
 
An interface for providing access to data when posting MultiPart messages.

Author(s):
Michael Becke
Since:
2.0
See also:
FilePart
public interface PartSource {

    
Gets the number of bytes contained in this source.

Returns:
a value >= 0
    long getLength();

    
Gets the name of the file this source represents.

Returns:
the fileName used for posting a MultiPart file part
    String getFileName();

    
Gets a new InputStream for reading this source. This method can be called more than once and should therefore return a new stream every time.

Returns:
a new InputStream
Throws:
java.io.IOException if an error occurs when creating the InputStream
New to GrepCode? Check out our FAQ X