Minor fixes to fix Eclipse warnings

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@755808 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2009-03-19 01:37:11 +00:00
parent adb782ce7e
commit b44390712c
5 changed files with 9 additions and 3 deletions

View File

@ -188,7 +188,7 @@ public class HttpMultipart extends Multipart {
writeBytes(TWO_DASHES, out); writeBytes(TWO_DASHES, out);
writeBytes(boundary, out); writeBytes(boundary, out);
writeBytes(CR_LF, out); writeBytes(CR_LF, out);
BodyPart part = (BodyPart) bodyParts.get(i); BodyPart part = bodyParts.get(i);
Field cd = part.getHeader().getField(MIME.CONTENT_DISPOSITION); Field cd = part.getHeader().getField(MIME.CONTENT_DISPOSITION);

View File

@ -65,10 +65,12 @@ public abstract class AbstractContentBody extends SingleBody implements ContentB
} }
} }
@Override
public Entity getParent() { public Entity getParent() {
return this.parent; return this.parent;
} }
@Override
public void setParent(final Entity parent) { public void setParent(final Entity parent) {
this.parent = parent; this.parent = parent;
} }
@ -89,6 +91,7 @@ public abstract class AbstractContentBody extends SingleBody implements ContentB
return Collections.emptyMap(); return Collections.emptyMap();
} }
@Override
public void dispose() { public void dispose() {
} }

View File

@ -71,6 +71,7 @@ public class FileBody extends AbstractContentBody {
writeTo(out); writeTo(out);
} }
@Override
public void writeTo(final OutputStream out) throws IOException { public void writeTo(final OutputStream out) throws IOException {
if (out == null) { if (out == null) {
throw new IllegalArgumentException("Output stream may not be null"); throw new IllegalArgumentException("Output stream may not be null");

View File

@ -59,7 +59,7 @@ public class InputStreamBody extends AbstractContentBody {
this(in, "application/octet-stream", filename); this(in, "application/octet-stream", filename);
} }
public InputStream getInputStream() throws IOException { public InputStream getInputStream() {
return this.in; return this.in;
} }
@ -71,6 +71,7 @@ public class InputStreamBody extends AbstractContentBody {
writeTo(out); writeTo(out);
} }
@Override
public void writeTo(final OutputStream out) throws IOException { public void writeTo(final OutputStream out) throws IOException {
if (out == null) { if (out == null) {
throw new IllegalArgumentException("Output stream may not be null"); throw new IllegalArgumentException("Output stream may not be null");

View File

@ -76,7 +76,7 @@ public class StringBody extends AbstractContentBody {
this(text, "text/plain", null); this(text, "text/plain", null);
} }
public Reader getReader() throws IOException { public Reader getReader() {
return new InputStreamReader( return new InputStreamReader(
new ByteArrayInputStream(this.content), new ByteArrayInputStream(this.content),
this.charset); this.charset);
@ -90,6 +90,7 @@ public class StringBody extends AbstractContentBody {
writeTo(out); writeTo(out);
} }
@Override
public void writeTo(final OutputStream out) throws IOException { public void writeTo(final OutputStream out) throws IOException {
if (out == null) { if (out == null) {
throw new IllegalArgumentException("Output stream may not be null"); throw new IllegalArgumentException("Output stream may not be null");