1 Change Log 2 ========== 3 4 ## Version 1.3.0 5 6 _2015-03-16_ 7 8 * New: Read and write signed decimal and unsigned hexadecimal values in 9 `BufferedSource` and `BufferedSink`. Unlike the alternatives, these methods 10 dont do any memory allocations! 11 * New: Segment sharing. This improves the runtime of operations like 12 `Buffer.clone()` and `Buffer.copyTo()` by sharing underlying segments between 13 buffers. 14 * New: `Buffer.snapshot()` returns an immutable snapshot of a buffer as a 15 `ByteString`. This builds on segment sharing so that snapshots are shallow, 16 immutable copies. 17 * New: `ByteString.rangeEquals()`. 18 * New: `ByteString.md5()` and `ByteString.sha256()`. 19 * New: `ByteString.base64Url()` returns URL-safe Base64. The existing 20 decoding method has been extended to support URL-safe Base64 input. 21 * New: `ByteString.substring()` returns a prefix, infix, or suffix. 22 * New: `Sink` now implements `java.io.Flushable`. 23 * Fix: `Buffer.write(Source, long)` now always writes fully. The previous 24 behavior would return as soon as any data had been written; this was 25 inconsistent with all other _write()_ methods in the API. 26 * Fix: don't leak empty segments in DeflaterSink and InflaterSource. (This was 27 unlikely to cause problems in practice.) 28 29 ## Version 1.2.0 30 31 _2014-12-30_ 32 33 * Fix: `Okio.buffer()` _always_ buffers for better predictability. 34 * Fix: Provide context when `readUtf8LineStrict()` throws. 35 * Fix: Buffers do not call through the `Source` on zero-byte writes. 36 37 ## Version 1.1.0 38 39 _2014-12-11_ 40 * Do UTF-8 encoding natively for a performance increase, particularly on Android. 41 * New APIs: `BufferedSink.emit()`, `BufferedSource.request()` and `BufferedSink.indexOfElement()`. 42 * Fixed a performance bug in `Buffer.indexOf()` 43 44 ## Version 1.0.1 45 46 _2014-08-08_ 47 48 * Added `read(byte[])`, `read(byte[], offset, byteCount)`, and 49 `void readFully(byte[])` to `BufferedSource`. 50 * Refined declared checked exceptions on `Buffer` methods. 51 52 53 ## Version 1.0.0 54 55 _2014-05-23_ 56 57 * Bumped release version. No other changes! 58 59 ## Version 0.9.0 60 61 _2014-05-03_ 62 63 * Use 0 as a sentinel for no timeout. 64 * Make AsyncTimeout public. 65 * Remove checked exception from Buffer.readByteArray. 66 67 ## Version 0.8.0 68 69 _2014-04-24_ 70 71 * Eagerly verify preconditions on public APIs. 72 * Quick return on Buffer instance equivalence. 73 * Add delegate types for Sink and Source. 74 * Small changes to the way deadlines are managed. 75 * Add append variant of Okio.sink for File. 76 * Methods to exhaust BufferedSource to byte[] and ByteString. 77 78 ## Version 0.7.0 79 80 _2014-04-18_ 81 82 * Don't use getters in timeout. 83 * Use the watchdog to interrupt sockets that have reached deadlines. 84 * Add java.io and java.nio file source/sink helpers. 85 86 ## Version 0.6.1 87 88 _2014-04-17_ 89 90 * Methods to read a buffered source fully in UTF-8 or supplied charset. 91 * API to read a byte[] directly. 92 * New methods to move all data from a source to a sink. 93 * Fix a bug on input stream exhaustion. 94 95 ## Version 0.6.0 96 97 _2014-04-15_ 98 99 * Make ByteString serializable. 100 * New API: `ByteString.of(byte[] data, int offset, int byteCount)` 101 * New API: stream-based copy, write, and read helpers. 102 103 ## Version 0.5.0 104 105 _2014-04-08_ 106 107 * Initial public release. 108 * Imported from OkHttp. 109