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()
TypedOutput
fileName
in interface TypedOutput
public String mimeType()
TypedOutput
mimeType
in interface TypedOutput
public long length()
TypedOutput
length
in interface TypedOutput
public void writeTo(OutputStream out) throws IOException
TypedOutput
writeTo
in interface TypedOutput
IOException
Copyright © 2015 Square, Inc.. All Rights Reserved.