2015-08-25
BufferedSource.indexOf(ByteString) searches a source for the next occurrence of a byte string.AssertionError thrown on Android 4.2.2 and earlier when asynchronously closing a socket.2015-06-19
SocketTimeoutException. This builds on new extension point in AsyncTimeout to customize the exception when a timeout occurs.ByteString now implements Comparable. The comparison sorts bytes as unsigned: {@code ff} sorts after {@code 00}.2015-05-16
Timeout.throwIfReached() would throw InterruptedIOException on thread interruption, and IOException if the deadline was reached. Now it throws InterruptedIOException in both cases.EOFException when attempting to read digits from an empty source. Previously this would crash with an unchecked exception.BufferedSink can now write substrings directly, potentially saving an allocation for some callers.ForwardingTimeout class.2015-03-16
BufferedSource and BufferedSink. Unlike the alternatives, these methods don’t do any memory allocations!Buffer.clone() and Buffer.copyTo() by sharing underlying segments between buffers.Buffer.snapshot() returns an immutable snapshot of a buffer as a ByteString. This builds on segment sharing so that snapshots are shallow, immutable copies.ByteString.rangeEquals().ByteString.md5() and ByteString.sha256().ByteString.base64Url() returns URL-safe Base64. The existing decoding method has been extended to support URL-safe Base64 input.ByteString.substring() returns a prefix, infix, or suffix.Sink now implements java.io.Flushable.Buffer.write(Source, long) now always writes fully. The previous behavior would return as soon as any data had been written; this was inconsistent with all other write() methods in the API.2014-12-30
Okio.buffer() always buffers for better predictability.readUtf8LineStrict() throws.Source on zero-byte writes.2014-12-11
BufferedSink.emit(), BufferedSource.request() and BufferedSink.indexOfElement().Buffer.indexOf()2014-08-08
read(byte[]), read(byte[], offset, byteCount), and void readFully(byte[]) to BufferedSource.Buffer methods.2014-05-23
2014-05-03
2014-04-24
2014-04-18
2014-04-17
2014-04-15
ByteString.of(byte[] data, int offset, int byteCount)2014-04-08