fixing several GD# -- see green colors
[jalview.git] / src / jalview / javascript / web / ClientResponse.java
index e33dd98..9a9dba6 100644 (file)
@@ -2,13 +2,19 @@ package jalview.javascript.web;
 
 import java.net.URI;
 
+/**
+ * minimal implementation of com.sun.jersey.api.client.ClientResponse
+ * 
+ * @author hansonr
+ *
+ */
 public class ClientResponse
 {
   
   private String response;
-  private String encoding;
+  private String[] encoding;
 
-  public ClientResponse(String response, String encoding) 
+  public ClientResponse(String response, String... encoding) 
   {
     this.response = response;
     this.encoding = encoding;
@@ -47,7 +53,7 @@ public class ClientResponse
   public int getStatus()
   {
     // note, we could get the actual response. I am just assuming it is 200 or 400
-    return (response != null && (response.startsWith("{") == encoding.equals("application/json"))
+    return (response != null && (response.startsWith("{") == encoding[0].equals("application/json"))
             ? 200 : 400);
   }