Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Interface that defines how calling application needs to expose data to upload, so that client can upload it to multiple stores (or for possible retries) as necessary.

Methods are typically called in order of:

  1. contentAsBytes()
  2. contentAsFile()
  3. contentAsStream()
until non-null response is received; not that most implementations return null from one or more of methods, to indicate that they are not optimal accessors.
public interface PutContentProvider

Length of content, if known; -1 if not known
    public long length();
    public ByteContainer contentAsBytes();
    public File contentAsFile() throws;
    public contentAsStream() throws;
    public int getContentHash();
    public void setContentHash(int hash);
New to GrepCode? Check out our FAQ X