formatting

git-svn-id: http://jclouds.googlecode.com/svn/trunk@1903 3d8758e0-26b5-11de-8745-db77d3ebf521
This commit is contained in:
adrian.f.cole 2009-09-23 23:18:45 +00:00
parent d941ae646e
commit 4a091d0669
1 changed files with 42 additions and 43 deletions

View File

@ -24,8 +24,7 @@
package org.jclouds.http; package org.jclouds.http;
import java.io.InputStream; import java.io.InputStream;
import java.net.URL; import java.net.URI;
/** /**
* Represents a response produced from {@link HttpCommandExecutorService} * Represents a response produced from {@link HttpCommandExecutorService}
@ -33,53 +32,53 @@ import java.net.URL;
* @author Adrian Cole * @author Adrian Cole
*/ */
public class HttpResponse extends HttpMessage { public class HttpResponse extends HttpMessage {
private URL requestURL; private URI requestURL;
private int statusCode; private int statusCode;
private String message; private String message;
private InputStream content; private InputStream content;
public HttpResponse(URL requestURL) { public HttpResponse(URI requestURL) {
this.requestURL = requestURL; this.requestURL = requestURL;
} }
@Override @Override
public String toString() { public String toString() {
final StringBuilder sb = new StringBuilder(); final StringBuilder sb = new StringBuilder();
sb.append("HttpResponse"); sb.append("HttpResponse");
sb.append("{statusCode=").append(statusCode); sb.append("{statusCode=").append(statusCode);
sb.append(", headers=").append(headers); sb.append(", headers=").append(headers);
sb.append(", message='").append(message).append('\''); sb.append(", message='").append(message).append('\'');
sb.append(", content set=").append(content != null); sb.append(", content set=").append(content != null);
sb.append('}'); sb.append('}');
return sb.toString(); return sb.toString();
} }
public int getStatusCode() { public int getStatusCode() {
return statusCode; return statusCode;
} }
public void setStatusCode(int statusCode) { public void setStatusCode(int statusCode) {
this.statusCode = statusCode; this.statusCode = statusCode;
} }
public String getMessage() { public String getMessage() {
return message; return message;
} }
public void setMessage(String message) { public void setMessage(String message) {
this.message = message; this.message = message;
} }
public InputStream getContent() { public InputStream getContent() {
return content; return content;
} }
public void setContent(InputStream content) { public void setContent(InputStream content) {
this.content = content; this.content = content;
} }
public URL getRequestURL() { public URI getRequestURL() {
return this.requestURL; return this.requestURL;
} }
} }