3131import com .google .gson .reflect .TypeToken ;
3232
3333import static com .algorithmia .algo .Algorithm .AlgorithmOutputType ;
34+
3435/**
3536 * Various HTTP actions, using our HttpClient class, and automatically adding authorization
3637 */
@@ -95,15 +96,15 @@ public AlgoResponseHandler(AlgorithmOutputType outputType) {
9596 @ Override
9697 protected AlgoResponse buildResult (HttpContext context ) throws APIException {
9798 if (outputType .equals (AlgorithmOutputType .RAW )) {
98- return parseRawOutpout (response );
99+ return parseRawOutput (response );
99100 } else {
100101 JsonElement json = parseResponseJson (response );
101102 return jsonToAlgoResponse (json , outputType );
102103 }
103104 }
104105 }
105106
106- public static AlgoResponse parseRawOutpout (HttpResponse response ) throws APIException {
107+ private static AlgoResponse parseRawOutput (HttpResponse response ) throws APIException {
107108 throwIfNotOk (response );
108109 try {
109110 final HttpEntity entity = response .getEntity ();
@@ -126,7 +127,7 @@ public static AlgoResponse jsonToAlgoResponse(JsonElement json, AlgorithmOutputT
126127 stacktrace = error .get ("stacktrace" ).getAsString ();
127128 }
128129 return new AlgoFailure (new AlgorithmException (msg , null , stacktrace ));
129- } else if (AlgorithmOutputType .DEFAULT .equals (outputType )){
130+ } else if (AlgorithmOutputType .DEFAULT .equals (outputType )) {
130131 JsonObject metaJson = obj .getAsJsonObject ("metadata" );
131132 Double duration = metaJson .get ("duration" ).getAsDouble ();
132133 com .algorithmia .algo .ContentType contentType = com .algorithmia .algo .ContentType .fromString (metaJson .get ("content_type" ).getAsString ());
0 commit comments