protected Object decodeResponse(InputStream inputStream,String contentType) throws IOException {
  Object value;
  if (contentType.startsWith(JSON_MIME_TYPE)) {
    JSONDecoder decoder=new JSONDecoder();
    value=decoder.readValue(inputStream);
  }
 else   if (contentType.startsWith(TEXT_MIME_TYPE_PREFIX)) {
    TextDecoder decoder=new TextDecoder();
    value=decoder.readValue(inputStream);
  }
 else {
    value=null;
  }
  return value;
}

protected Object decodeResponse ( InputStream inputStream , String contentType ) throws IOException { Object value ; if ( contentType . startsWith ( JSON_MIME_TYPE ) ) { JSONDecoder decoder = new JSONDecoder ( ) ; value = decoder . readValue ( inputStream ) ; } else if ( contentType . startsWith ( TEXT_MIME_TYPE_PREFIX ) ) { TextDecoder decoder = new TextDecoder ( ) ; value = decoder . readValue ( inputStream ) ; } else { value = null ; } return value ; }
decodes a response value .
