public class BinaryAttachment extends Object
Normally this would be a photo or video.
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object that) |
String |
getContentType() |
InputStream |
getData()
The attachment's data.
|
String |
getFilename() |
int |
hashCode() |
String |
toString() |
static BinaryAttachment |
with(String filename,
byte[] data)
Creates a binary attachment.
|
static BinaryAttachment |
with(String filename,
byte[] data,
String contentType)
Creates a binary attachment.
|
static BinaryAttachment |
with(String filename,
InputStream data)
Deprecated.
use the stream-less API passing a
byte[] for data |
static BinaryAttachment |
with(String filename,
InputStream data,
String contentType)
Deprecated.
use the stream-less API passing a
byte[] for data instead |
@Deprecated public static BinaryAttachment with(String filename, InputStream data)
byte[]
for datafilename
- The attachment's filename.data
- The attachment's data.IllegalArgumentException
- If data
is null
or filename
is null
or blank.@Deprecated public static BinaryAttachment with(String filename, InputStream data, String contentType)
byte[]
for data insteadfilename
- The attachment's filename.data
- The attachment's data.contentType
- The attachment's contentType.IllegalArgumentException
- If data
is null
or filename
is null
or blank.public static BinaryAttachment with(String filename, byte[] data)
filename
- The attachment's filename.data
- The attachment's data.IllegalArgumentException
- If data
is null
or filename
is null
or blank.public static BinaryAttachment with(String filename, byte[] data, String contentType)
filename
- The attachment's filename.data
- The attachment's data.contentType
- The attachment's contentType.IllegalArgumentException
- If data
is null
or filename
is null
or blank.public int hashCode()
hashCode
in class Object
Object.hashCode()
public boolean equals(Object that)
equals
in class Object
Object.equals(java.lang.Object)
public String toString()
toString
in class Object
Object.toString()
public InputStream getData()
public String getFilename()
public String getContentType()
RestFB 1.7.0. Copyright © 2010-2014 Mark Allen. All Rights Reserved.