retrofit.mime
Class MultipartTypedOutput

java.lang.Object
  extended by retrofit.mime.MultipartTypedOutput
All Implemented Interfaces:
TypedOutput

public final class MultipartTypedOutput
extends Object
implements TypedOutput


Constructor Summary
MultipartTypedOutput()
           
 
Method Summary
 void addPart(String name, TypedOutput body)
           
 String fileName()
          Original filename.
 long length()
          Length in bytes or -1 if unknown.
 String mimeType()
          Returns the mime type.
 void writeTo(OutputStream out)
          Writes these bytes to the given output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultipartTypedOutput

public MultipartTypedOutput()
Method Detail

addPart

public void addPart(String name,
                    TypedOutput body)

fileName

public String fileName()
Description copied from interface: TypedOutput
Original filename. Used only for multipart requests, may be null.

Specified by:
fileName in interface TypedOutput

mimeType

public String mimeType()
Description copied from interface: TypedOutput
Returns the mime type.

Specified by:
mimeType in interface TypedOutput

length

public long length()
Description copied from interface: TypedOutput
Length in bytes or -1 if unknown.

Specified by:
length in interface TypedOutput

writeTo

public void writeTo(OutputStream out)
             throws IOException
Description copied from interface: TypedOutput
Writes these bytes to the given output stream.

Specified by:
writeTo in interface TypedOutput
Throws:
IOException


Copyright © 2013 Square, Inc.. All Rights Reserved.