net.rim.pushsdk.commons.content
Class Mp4AudioContent
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.Mp4AudioContent
public class Mp4AudioContent
- extends BinaryContent
Represents MP4 audio content. The content-type header is set to audio/mp4.
- Author:
- mdandrea
|
Constructor Summary |
Mp4AudioContent(byte[] content,
boolean shouldBase64Encode)
Constructs an MP4 audio with the specified content. |
Mp4AudioContent(File file,
boolean shouldBase64Encode)
Constructs an MP4 audio from the specified file. |
Mp4AudioContent(URL url,
boolean shouldBase64Encode)
Constructs an MP4 audio from the specified URL. |
|
Method Summary |
protected void |
checkExtension(String string)
Verifies that the audio ends in the .mp4, .m4a, or .m4b file extension. |
String |
toString()
Constructs a String with all attributes in name = value format. |
Mp4AudioContent
public Mp4AudioContent(byte[] content,
boolean shouldBase64Encode)
- Constructs an MP4 audio with the specified content. The audio is base64 encoded if requested.
- Parameters:
content - the MP4 audio contentshouldBase64Encode - true if the content should be base64 encoded; false otherwise
Mp4AudioContent
public Mp4AudioContent(File file,
boolean shouldBase64Encode)
throws IOException
- Constructs an MP4 audio from the specified file. The audio is base64 encoded if requested.
- Parameters:
file - the MP4 audio fileshouldBase64Encode - true if the content should be base64 encoded; false otherwise
- Throws:
IOException - if any IO errors occur reading from the file
Mp4AudioContent
public Mp4AudioContent(URL url,
boolean shouldBase64Encode)
throws IOException
- Constructs an MP4 audio from the specified URL. The audio is base64 encoded if requested.
- Parameters:
url - the MP4 audio 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 audio ends in the .mp4, .m4a, or .m4b 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.