commit | ed6f833f2f3f7ef34ac75aa7d13b61a8412cdc92 | [log] [tgz] |
---|---|---|
author | Jesse Wilson <jesse@swank.ca> | Mon Jun 21 21:41:42 2021 -0400 |
committer | GitHub <noreply@github.com> | Mon Jun 21 21:41:42 2021 -0400 |
tree | 62f4af0ecd4a91a8aa0ff0d2c03c8c6a1cbea57b | |
parent | 0c8e9f96f08cbfdc176aeecdf393854c8cbfbde8 [diff] |
APIs to seek a FileHandle's source or sink (#959) The one fancy thing we're doing here is preserving the buffered data if we're seeking forward on a source. I don't think there's a compelling equivalent for preserving buffered data when seeking backwards on a sink. In theory we could truncate the buffer to the new seek position, but this breaks if the writer doesn't overwrite the full range of what was truncated.
See the project website for documentation and APIs.
Okio is a library that complements java.io
and java.nio
to make it much easier to access, store, and process your data. It started as a component of OkHttp, the capable HTTP client included in Android. It's well-exercised and ready to solve new problems.
Copyright 2013 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.