summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/isode/stroke/filetransfer/WriteBytestream.java')
-rw-r--r--src/com/isode/stroke/filetransfer/WriteBytestream.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/com/isode/stroke/filetransfer/WriteBytestream.java b/src/com/isode/stroke/filetransfer/WriteBytestream.java
index c243bdc..81d2093 100644
--- a/src/com/isode/stroke/filetransfer/WriteBytestream.java
+++ b/src/com/isode/stroke/filetransfer/WriteBytestream.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -16,7 +16,14 @@ import com.isode.stroke.signals.Signal1;
public abstract class WriteBytestream {
- public abstract void write(final ByteArray b);
+ /**
+ * Write data from a {@link ByteArray} to the bytestream. On
+ * success {@code true} is returned and {@link #onWrite} is called.
+ * On failure {@code false} is returned.
+ * @param b The {@link ByteArray} to write.
+ * @return {@code true} on success, {@code false} on failure.
+ */
+ public abstract boolean write(final ByteArray b);
public final Signal1<ByteArray> onWrite = new Signal1<ByteArray>();
} \ No newline at end of file