com.restfb
Class BinaryAttachment

java.lang.Object
  extended by com.restfb.BinaryAttachment

public class BinaryAttachment
extends Object

Represents a binary file that can be uploaded to Facebook.

Normally this would be a photo or video.

Since:
1.6.5
Author:
Mark Allen

Method Summary
 boolean equals(Object that)
           
 InputStream getData()
          The attachment's data.
 String getFilename()
          The attachment's filename.
 int hashCode()
           
 String toString()
           
static BinaryAttachment with(String filename, InputStream data)
          Creates a binary attachment.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

with

public static BinaryAttachment with(String filename,
                                    InputStream data)
Creates a binary attachment.

Parameters:
filename - The attachment's filename.
data - The attachment's data.
Returns:
A binary attachment.
Throws:
IllegalArgumentException - If data is null or filename is null or blank.

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object that)
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

getFilename

public String getFilename()
The attachment's filename.

Returns:
The attachment's filename.

getData

public InputStream getData()
The attachment's data.

Returns:
The attachment's data.


RestFB 1.6.8. Copyright © 2010-2011 Mark Allen. All Rights Reserved.