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.
2 files changed
tree: 62f4af0ecd4a91a8aa0ff0d2c03c8c6a1cbea57b
  1. .buildscript/
  2. .github/
  3. android-test/
  4. buildSrc/
  5. docs/
  6. gradle/
  7. okio/
  8. okio-fakefilesystem/
  9. okio-nodefilesystem/
  10. samples/
  11. .editorconfig
  12. .gitignore
  13. BUG-BOUNTY.md
  14. build.gradle.kts
  15. CHANGELOG.md
  16. CONTRIBUTING.md
  17. gradle.properties
  18. gradlew
  19. gradlew.bat
  20. LICENSE.txt
  21. mkdocs.yml
  22. README.md
  23. settings.gradle.kts
README.md

Okio

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.

License

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.