public final class MultipartTypedOutput extends Object implements TypedOutput
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_TRANSFER_ENCODING |
| Constructor and Description |
|---|
MultipartTypedOutput() |
| Modifier and Type | Method and Description |
|---|---|
void |
addPart(String name,
String transferEncoding,
TypedOutput body) |
void |
addPart(String name,
TypedOutput body) |
String |
fileName()
Original filename.
|
int |
getPartCount() |
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.
|
public static final String DEFAULT_TRANSFER_ENCODING
public void addPart(String name, TypedOutput body)
public void addPart(String name, String transferEncoding, TypedOutput body)
public int getPartCount()
public String fileName()
TypedOutputfileName in interface TypedOutputpublic String mimeType()
TypedOutputmimeType in interface TypedOutputpublic long length()
TypedOutputlength in interface TypedOutputpublic void writeTo(OutputStream out) throws IOException
TypedOutputwriteTo in interface TypedOutputIOExceptionCopyright © 2015 Square, Inc.. All Rights Reserved.