Back to project page Buddy-Android-SDK.
The source code is released under:
Apache License
If you think the Android project Buddy-Android-SDK listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.buddy.sdk; // w w w .j av a 2 s . com import java.io.File; import java.io.InputStream; /** * Created by shawn on 7/5/14. */ public class BuddyFile { File file; InputStream stream; String contentType; public BuddyFile(File file, String contentType) { if (file == null || contentType == null) throw new IllegalArgumentException(); this.contentType = contentType; this.file = file; } public BuddyFile(InputStream stream, String contentType) { if (stream == null || contentType == null) throw new IllegalArgumentException(); this.contentType = contentType; this.stream = stream; } public Object getValue() { if (file != null) { return file; } return stream; } public InputStream getStream() { return stream; } public File getFile() { return file; } public String getContentType() { return contentType; } }