diff options
author | Tao Liejun <L.J.Tao@motorola.com> | 2009-07-13 15:57:11 -0700 |
---|---|---|
committer | Nick Pelly <npelly@google.com> | 2009-07-14 21:20:39 -0700 |
commit | 05ff98bbefda39b9ff26f8bca132cfd0248745c6 (patch) | |
tree | dd7399785790ece3f34d1725972f1a0a128cf4df /obex/javax/obex/PrivateOutputStream.java | |
parent | c047d68372ece9fa74446b13ea66bc12b060b882 (diff) | |
download | frameworks_base-05ff98bbefda39b9ff26f8bca132cfd0248745c6.zip frameworks_base-05ff98bbefda39b9ff26f8bca132cfd0248745c6.tar.gz frameworks_base-05ff98bbefda39b9ff26f8bca132cfd0248745c6.tar.bz2 |
Fix minor obex bugs and re-format the comments
re-format comments
move connectible to connectable
remove unnecessary throws
remove not-used function ClientOperation.readResponse()
fix client abort case for PUT
set mOpen for PrivateOutputStream
add to platform.xml
Diffstat (limited to 'obex/javax/obex/PrivateOutputStream.java')
-rw-r--r-- | obex/javax/obex/PrivateOutputStream.java | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/obex/javax/obex/PrivateOutputStream.java b/obex/javax/obex/PrivateOutputStream.java index d972f78..ca420af 100644 --- a/obex/javax/obex/PrivateOutputStream.java +++ b/obex/javax/obex/PrivateOutputStream.java @@ -39,7 +39,6 @@ import java.io.ByteArrayOutputStream; /** * This object provides an output stream to the Operation objects used in this * package. - * * @hide */ public final class PrivateOutputStream extends OutputStream { @@ -54,18 +53,17 @@ public final class PrivateOutputStream extends OutputStream { /** * Creates an empty <code>PrivateOutputStream</code> to write to. - * * @param p the connection that this stream runs over */ public PrivateOutputStream(BaseStream p, int maxSize) { mParent = p; mArray = new ByteArrayOutputStream(); mMaxPacketSize = maxSize; + mOpen = true; } /** * Determines how many bytes have been written to the output stream. - * * @return the number of bytes written to the output stream */ public int size() { @@ -73,13 +71,11 @@ public final class PrivateOutputStream extends OutputStream { } /** - * Writes the specified byte to this output stream. The general contract - * for write is that one byte is written to the output stream. The byte to - * be written is the eight low-order bits of the argument b. The 24 - * high-order bits of b are ignored. - * + * Writes the specified byte to this output stream. The general contract for + * write is that one byte is written to the output stream. The byte to be + * written is the eight low-order bits of the argument b. The 24 high-order + * bits of b are ignored. * @param b the byte to write - * * @throws IOException if an I/O error occurs */ @Override @@ -128,9 +124,7 @@ public final class PrivateOutputStream extends OutputStream { /** * Reads the bytes that have been written to this stream. - * * @param size the size of the array to return - * * @return the byte array that is written */ public synchronized byte[] readBytes(int size) { @@ -150,7 +144,6 @@ public final class PrivateOutputStream extends OutputStream { /** * Verifies that this stream is open - * * @throws IOException if the stream is not open */ private void ensureOpen() throws IOException { @@ -161,9 +154,8 @@ public final class PrivateOutputStream extends OutputStream { } /** - * Closes the output stream. If the input stream is already closed, do + * Closes the output stream. If the input stream is already closed, do * nothing. - * * @throws IOException this will never happen */ @Override @@ -174,9 +166,8 @@ public final class PrivateOutputStream extends OutputStream { /** * Determines if the connection is closed - * - * @return <code>true</code> if the connection is closed; - * <code>false</code> if the connection is open + * @return <code>true</code> if the connection is closed; <code>false</code> + * if the connection is open */ public boolean isClosed() { return !mOpen; |