net.rim.pushsdk.commons.content
Class ThreeGPVideoContent
java.lang.Object
net.rim.pushsdk.commons.content.Content
net.rim.pushsdk.commons.content.SinglePartContent
net.rim.pushsdk.commons.content.BinaryContent
net.rim.pushsdk.commons.content.ThreeGPVideoContent
public class ThreeGPVideoContent
- extends BinaryContent
Represents 3GP video content. The content-type header is set to video/3gpp.
- Author:
- mdandrea
|
Constructor Summary |
ThreeGPVideoContent(byte[] content,
boolean shouldBase64Encode)
Constructs a 3GP video with the specified content. |
ThreeGPVideoContent(File file,
boolean shouldBase64Encode)
Constructs a 3GP video from the specified file. |
ThreeGPVideoContent(URL url,
boolean shouldBase64Encode)
Constructs a 3GP video from the specified URL. |
|
Method Summary |
protected void |
checkExtension(String string)
Verifies that the video ends in the .3gp or .3g2 file extension. |
String |
toString()
Constructs a String with all attributes in name = value format. |
ThreeGPVideoContent
public ThreeGPVideoContent(byte[] content,
boolean shouldBase64Encode)
- Constructs a 3GP video with the specified content. The video is base64 encoded if requested.
- Parameters:
content - the 3GP video contentshouldBase64Encode - true if the content should be base64 encoded; false otherwise
ThreeGPVideoContent
public ThreeGPVideoContent(File file,
boolean shouldBase64Encode)
throws IOException
- Constructs a 3GP video from the specified file. The video is base64 encoded if requested.
- Parameters:
file - the 3GP video fileshouldBase64Encode - true if the content should be base64 encoded; false otherwise
- Throws:
IOException - if any IO errors occur reading from the file
ThreeGPVideoContent
public ThreeGPVideoContent(URL url,
boolean shouldBase64Encode)
throws IOException
- Constructs a 3GP video from the specified URL. The video is base64 encoded if requested.
- Parameters:
url - the 3GP video URLshouldBase64Encode - true if the content should be base64 encoded; false otherwise
- Throws:
IOException - if any IO errors occur reading from the URL
checkExtension
protected void checkExtension(String string)
- Verifies that the video ends in the .3gp or .3g2 file extension.
- Overrides:
checkExtension in class SinglePartContent
- Parameters:
string - the file name
toString
public String toString()
- Constructs a
String with all attributes in name = value format.
- Overrides:
toString in class BinaryContent
- Returns:
- a
String representation of this object.
Copyright © 2011 Research In Motion. All Rights Reserved.