com.google.zxing.client.android
Class HttpHelper

java.lang.Object
  extended by com.google.zxing.client.android.HttpHelper

public final class HttpHelper
extends java.lang.Object

Utility methods for retrieving content over HTTP using the more-supported java.net classes in Android.


Nested Class Summary
static class HttpHelper.ContentType
           
 
Method Summary
static java.lang.String downloadViaHttp(java.lang.String uri, HttpHelper.ContentType type)
           
static java.net.URI unredirect(java.net.URI uri)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

downloadViaHttp

public static java.lang.String downloadViaHttp(java.lang.String uri,
                                               HttpHelper.ContentType type)
                                        throws java.io.IOException
Parameters:
uri - URI to retrieve
type - expected text-like MIME type of that content
Returns:
content as a String
Throws:
java.io.IOException - if the content can't be retrieved because of a bad URI, network problem, etc.

unredirect

public static java.net.URI unredirect(java.net.URI uri)
                               throws java.io.IOException
Throws:
java.io.IOException