Home | History | Annotate | Download | only in okio

Lines Matching defs:of

6  * You may obtain a copy of the License at
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
34 * An immutable sequence of bytes.
36 * <p>Byte strings compare lexicographically as a sequence of <strong>unsigned</strong> bytes. That
37 * is, the byte string {@code ff} sorts after {@code 00}. This is counter to the sort order of the
42 * to the mutable byte string, violating the immutable guarantee of this class. For this reason a
52 public static final ByteString EMPTY = ByteString.of();
63 * Returns a new byte string containing a clone of the bytes of {@code data}.
65 public static ByteString of(byte... data) {
71 * Returns a new byte string containing a copy of {@code byteCount} bytes of {@code data} starting
74 public static ByteString of(byte[] data, int offset, int byteCount) {
83 /** Returns a new byte string containing the {@code UTF-8} bytes of {@code s}. */
100 * href="http://www.ietf.org/rfc/rfc2045.txt">Base64</a>. In violation of the
107 /** Returns the MD5 hash of this byte string. */
112 /** Returns the SHA-256 hash of this byte string. */
119 return ByteString.of(MessageDigest.getInstance(digest).digest(data));
135 * Returns null if {@code base64} is not a Base64-encoded sequence of bytes.
165 return of(result);
244 * Returns a byte string that is a substring of this byte string, beginning at the specified
245 * index until the end of this string. Returns this byte string if {@code beginIndex} is 0.
252 * Returns a byte string that is a substring of this byte string, beginning at the specified
254 * {@code beginIndex} is 0 and {@code endIndex} is the length of this byte string.
280 * Returns the number of bytes in this ByteString.
287 * Returns a byte array containing a copy of the bytes in this {@code ByteString}.
293 /** Writes the contents of this byte string to {@code out}. */
299 /** Writes the contents of this byte string to {@code buffer}. */
305 * Returns true if the bytes of this in {@code [offset..offset+byteCount)} equal the bytes of
307 * out of bounds.
314 * Returns true if the bytes of this in {@code [offset..offset+byteCount)} equal the bytes of
316 * out of bounds.