Package com.restfb

Klasse BinaryAttachment

java.lang.Object
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.

Seit:
1.6.5
Autor:
Mark Allen, Marcel Stoer
  • Konstruktordetails

    • BinaryAttachment

      @Deprecated protected BinaryAttachment(String filename, InputStream data)
      Veraltet.
      use the stream-less API passing a byte[] for data
      Creates a new binary attachment.
      Parameter:
      filename - The attachment's filename.
      data - The attachment's data.
      Löst aus:
      IllegalArgumentException - If data is null or filename is null or blank.
    • BinaryAttachment

      @Deprecated protected BinaryAttachment(String fieldName, String filename, InputStream data)
      Veraltet.
      use the stream-less API passing a byte[] for data
      Creates a new binary attachment.
      Parameter:
      fieldName - The field name the binary belongs to
      filename - The attachment's filename.
      data - The attachment's data.
      Löst aus:
      IllegalArgumentException - If data is null or filename is null or blank.
    • BinaryAttachment

      @Deprecated protected BinaryAttachment(String filename, InputStream data, String contentType)
      Veraltet.
      use the stream-less API passing a byte[] for data
      Creates a new binary attachment.
      Parameter:
      filename - The attachment's filename.
      data - The attachment's data.
      contentType - The attachment's contentType.
      Löst aus:
      IllegalArgumentException - If data is null, filename is null or blank, or contentType is null or blank.
      Seit:
      1.6.13
    • BinaryAttachment

      @Deprecated protected BinaryAttachment(String fieldName, String filename, InputStream data, String contentType)
      Veraltet.
      use the stream-less API passing a byte[] for data
      Creates a new binary attachment.
      Parameter:
      fieldName - The field name the binary belongs to
      filename - The attachment's filename.
      data - The attachment's data.
      contentType - The attachment's contentType.
      Löst aus:
      IllegalArgumentException - If data is null, filename is null or blank, or contentType is null or blank.
      Seit:
      1.6.13
    • BinaryAttachment

      protected BinaryAttachment(String filename, byte[] data)
      Creates a new binary attachment.
      Parameter:
      filename - The attachment's filename.
      data - The attachment's data.
      Löst aus:
      IllegalArgumentException - If data is null or filename is null or blank.
      Seit:
      1.6.17
    • BinaryAttachment

      protected BinaryAttachment(String fieldName, String filename, byte[] data)
      Creates a new binary attachment.
      Parameter:
      fieldName - The field name the binary belongs to
      filename - The attachment's filename.
      data - The attachment's data.
      Löst aus:
      IllegalArgumentException - If data is null or filename is null or blank.
      Seit:
      1.6.17
    • BinaryAttachment

      protected BinaryAttachment(String filename, byte[] data, String contentType)
      Creates a new binary attachment.
      Parameter:
      filename - The attachment's filename.
      data - The attachment's data.
      contentType - The attachment's contentType.
      Löst aus:
      IllegalArgumentException - If data is null, filename is null or blank, or contentType is null or blank.
      Seit:
      1.6.17
    • BinaryAttachment

      protected BinaryAttachment(String fieldName, String filename, byte[] data, String contentType)
      Creates a new binary attachment.
      Parameter:
      fieldName - The field name the binary belongs to
      filename - The attachment's filename.
      data - The attachment's data.
      contentType - The attachment's contentType.
      Löst aus:
      IllegalArgumentException - If data is null, filename is null or blank, or contentType is null or blank.
      Seit:
      1.6.17
  • Methodendetails

    • with

      @Deprecated public static BinaryAttachment with(String filename, InputStream data)
      Veraltet.
      use the stream-less API passing a byte[] for data
      Creates a binary attachment.
      Parameter:
      filename - The attachment's filename.
      data - The attachment's data.
      Gibt zurück:
      A binary attachment.
      Löst aus:
      IllegalArgumentException - If data is null or filename is null or blank.
    • with

      @Deprecated public static BinaryAttachment with(String fieldName, String filename, InputStream data)
      Veraltet.
      use the stream-less API passing a byte[] for data
      Creates a binary attachment.
      Parameter:
      fieldName - The field name the binary belongs to
      filename - The attachment's filename.
      data - The attachment's data.
      Gibt zurück:
      A binary attachment.
      Löst aus:
      IllegalArgumentException - If data is null or filename is null or blank.
    • with

      @Deprecated public static BinaryAttachment with(String filename, InputStream data, String contentType)
      Veraltet.
      use the stream-less API passing a byte[] for data instead
      Creates a binary attachment.
      Parameter:
      filename - The attachment's filename.
      data - The attachment's data.
      contentType - The attachment's contentType.
      Gibt zurück:
      A binary attachment.
      Löst aus:
      IllegalArgumentException - If data is null or filename is null or blank.
    • with

      @Deprecated public static BinaryAttachment with(String fieldName, String filename, InputStream data, String contentType)
      Veraltet.
      use the stream-less API passing a byte[] for data
      Creates a binary attachment.
      Parameter:
      fieldName - The field name the binary belongs to
      filename - The attachment's filename.
      data - The attachment's data.
      Gibt zurück:
      A binary attachment.
      Löst aus:
      IllegalArgumentException - If data is null or filename is null or blank.
    • with

      public static BinaryAttachment with(String filename, byte[] data)
      Creates a binary attachment.
      Parameter:
      filename - The attachment's filename.
      data - The attachment's data.
      Gibt zurück:
      A binary attachment.
      Löst aus:
      IllegalArgumentException - If data is null or filename is null or blank.
      Seit:
      1.6.17
    • with

      public static BinaryAttachment with(String fieldName, String filename, byte[] data)
      Creates a binary attachment.
      Parameter:
      fieldName - The field name the binary belongs to
      filename - The attachment's filename.
      data - The attachment's data.
      Gibt zurück:
      A binary attachment.
      Löst aus:
      IllegalArgumentException - If data is null or filename is null or blank.
      Seit:
      1.6.17
    • with

      public static BinaryAttachment with(String filename, byte[] data, String contentType)
      Creates a binary attachment.
      Parameter:
      filename - The attachment's filename.
      data - The attachment's data.
      contentType - The attachment's contentType.
      Gibt zurück:
      A binary attachment.
      Löst aus:
      IllegalArgumentException - If data is null or filename is null or blank.
      Seit:
      1.6.17
    • with

      public static BinaryAttachment with(String fieldName, String filename, byte[] data, String contentType)
      Creates a binary attachment.
      Parameter:
      fieldName - The field name the binary belongs to
      filename - The attachment's filename.
      data - The attachment's data.
      contentType - The attachment's contentType.
      Gibt zurück:
      A binary attachment.
      Löst aus:
      IllegalArgumentException - If data is null or filename is null or blank.
      Seit:
      1.6.17
    • hashCode

      public int hashCode()
      Setzt außer Kraft:
      hashCode in Klasse Object
    • equals

      public boolean equals(Object that)
      Setzt außer Kraft:
      equals in Klasse Object
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object
    • getData

      public InputStream getData()
      The attachment's data.
      Gibt zurück:
      The attachment's data.
    • getContentType

      return the given content type or try to guess from stream or file name. Depending of the available data.
      Gibt zurück:
      the content type
    • getFilename

      public String getFilename()
    • getFieldName

      public String getFieldName()