1515//
1616
1717
18- package com .rabbitmq .client . impl ;
18+ package com .rabbitmq .client ;
1919
2020import java .io .DataInputStream ;
2121import java .io .IOException ;
@@ -31,26 +31,26 @@ public interface LongString
3131 public static final long MAX_LENGTH = 0xffffffffL ;
3232
3333 /**
34- * Get the length of the content of the long string in bytes
35- * @return the length in bytes >= 0 <= MAX_LENGTH
34+ * @return the length of the {@link LongString} in bytes >= 0 <= MAX_LENGTH
3635 */
3736 public long length ();
3837
3938 /**
4039 * Get the content stream.
4140 * Repeated calls to this function return the same stream,
4241 * which may not support rewind.
43- * @return An input stream the reads the content
42+ * @return An input stream that reads the content of the {@link LongString}
4443 * @throws IOException if an error is encountered
4544 */
4645 public DataInputStream getStream () throws IOException ;
4746
4847 /**
49- * Get the content as a byte array.
50- * Repeated calls to this function return the same array.
51- * This function will fail if getContentLength() > Integer.MAX_VALUE
52- * throwing an IllegalStateException.
53- * @return the content as an array
48+ * Get the content as a byte array. This need not be a copy. Updates to the
49+ * returned array may change the value of the {@link LongString}.
50+ * Repeated calls to this function may return the same array.
51+ * This function will fail if <code><b>this</b>.length() > Integer.MAX_VALUE</code>,
52+ * throwing an {@link IllegalStateException}.
53+ * @return the array of bytes containing the content of the {@link LongString}
5454 */
5555 public byte [] getBytes ();
5656}
0 commit comments