Skip to content

Commit

Permalink
Updated Javadocs to get valid build output
Browse files Browse the repository at this point in the history
  • Loading branch information
smarek committed May 20, 2014
1 parent 27e9c23 commit 3c11bca
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ protected ExecutorService getDefaultThreadPool() {
/**
* Simple interface method, to enable or disable redirects. If you set manually RedirectHandler
* on underlying HttpClient, effects of this method will be canceled.
* <p/>
* <p>&nbsp;</p>
* Default setting is to disallow redirects.
*
* @param enableRedirects boolean
Expand Down
13 changes: 10 additions & 3 deletions library/src/main/java/com/loopj/android/http/Base64.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public class Base64 {

/**
* Decode the Base64-encoded data in input and return the data in a new byte array.
* <p/>
* <p>&nbsp;</p>
* <p>The padding '=' characters at the end are considered optional, but if any are present,
* there must be the correct number of them.
*
Expand All @@ -99,29 +99,31 @@ public class Base64 {
* @param flags controls certain features of the decoded output. Pass {@code DEFAULT} to decode
* standard Base64.
* @throws IllegalArgumentException if the input contains incorrect padding
* @return decoded bytes
*/
public static byte[] decode(String str, int flags) {
return decode(str.getBytes(), flags);
}

/**
* Decode the Base64-encoded data in input and return the data in a new byte array.
* <p/>
* <p>&nbsp;</p>
* <p>The padding '=' characters at the end are considered optional, but if any are present,
* there must be the correct number of them.
*
* @param input the input array to decode
* @param flags controls certain features of the decoded output. Pass {@code DEFAULT} to decode
* standard Base64.
* @throws IllegalArgumentException if the input contains incorrect padding
* @return decoded bytes
*/
public static byte[] decode(byte[] input, int flags) {
return decode(input, 0, input.length, flags);
}

/**
* Decode the Base64-encoded data in input and return the data in a new byte array.
* <p/>
* <p>&nbsp;</p>
* <p>The padding '=' characters at the end are considered optional, but if any are present,
* there must be the correct number of them.
*
Expand All @@ -131,6 +133,7 @@ public static byte[] decode(byte[] input, int flags) {
* @param flags controls certain features of the decoded output. Pass {@code DEFAULT} to decode
* standard Base64.
* @throws IllegalArgumentException if the input contains incorrect padding
* @return decoded bytes for given offset and length
*/
public static byte[] decode(byte[] input, int offset, int len, int flags) {
// Allocate space for the most data the input could represent.
Expand Down Expand Up @@ -425,6 +428,7 @@ public boolean process(byte[] input, int offset, int len, boolean finish) {
* @param input the data to encode
* @param flags controls certain features of the encoded output. Passing {@code DEFAULT} results
* in output that adheres to RFC 2045.
* @return base64 string containing encoded input
*/
public static String encodeToString(byte[] input, int flags) {
try {
Expand All @@ -443,6 +447,7 @@ public static String encodeToString(byte[] input, int flags) {
* @param len the number of bytes of input to encode
* @param flags controls certain features of the encoded output. Passing {@code DEFAULT}
* results in output that adheres to RFC 2045.
* @return base64 string containing encoded range of input
*/
public static String encodeToString(byte[] input, int offset, int len, int flags) {
try {
Expand All @@ -459,6 +464,7 @@ public static String encodeToString(byte[] input, int offset, int len, int flags
* @param input the data to encode
* @param flags controls certain features of the encoded output. Passing {@code DEFAULT} results
* in output that adheres to RFC 2045.
* @return base64 encoded input as bytes
*/
public static byte[] encode(byte[] input, int flags) {
return encode(input, 0, input.length, flags);
Expand All @@ -472,6 +478,7 @@ public static byte[] encode(byte[] input, int flags) {
* @param len the number of bytes of input to encode
* @param flags controls certain features of the encoded output. Passing {@code DEFAULT}
* results in output that adheres to RFC 2045.
* @return base64 encoded input as bytes
*/
public static byte[] encode(byte[] input, int offset, int len, int flags) {
Encoder encoder = new Encoder(flags, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* class, response will be then handled to implementation of abstract methods {@link #onSuccess(int,
* org.apache.http.Header[], String, Object)} or {@link #onFailure(int, org.apache.http.Header[],
* Throwable, String, Object)}, depending of response HTTP status line (result http code)
* @param <JSON_TYPE>
* @param <JSON_TYPE> Generic type meant to be returned in callback
*/
public abstract class BaseJsonHttpResponseHandler<JSON_TYPE> extends TextHttpResponseHandler {
private static final String LOG_TAG = "BaseJsonHttpResponseHandler";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ public class MySSLSocketFactory extends SSLSocketFactory {
* Creates a new SSL Socket Factory with the given KeyStore.
*
* @param truststore A KeyStore to create the SSL Socket Factory in context of
* @throws NoSuchAlgorithmException NoSuchAlgorithmException
* @throws KeyManagementException KeyManagementException
* @throws KeyStoreException KeyStoreException
* @throws UnrecoverableKeyException UnrecoverableKeyException
*/
public MySSLSocketFactory(KeyStore truststore) throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException {
super(truststore);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
* params.put("like", set); // url params: "like=music&amp;like=art"
*
* List&lt;String&gt; list = new ArrayList&lt;String&gt;(); // Ordered collection
* list.add("Java");<>
* list.add("Java");
* list.add("C");
* params.put("languages", list); // url params: "languages[]=Java&amp;languages[]=C"
*
Expand Down

0 comments on commit 3c11bca

Please sign in to comment.