Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make FixedLengthSource public API #1208

Open
Gaming32 opened this issue Jan 20, 2023 · 2 comments
Open

Make FixedLengthSource public API #1208

Gaming32 opened this issue Jan 20, 2023 · 2 comments

Comments

@Gaming32
Copy link

I know it's trivially reimplementable, but it still feels frustrating to reinvent the wheel when there's a perfectly good wheel that's internal. (I actually just copied the class into my own project, so there are two now, one internal to okio, and one in my project.)

@JakeWharton
Copy link
Member

I'm pretty sure we were supposed to expose this like 5 years ago. I'm not sure what happened. Probably my fault.

We agreed to expose it but I'm not sure if we settled on the API. I think it's probably something like Source.limit(long): Source which gives you a wrapped source that doesn't let you read past n bytes.

@swankjesse
Copy link
Member

image

Okay this is pretty awesome. The G in your profile pic is from the Chlorinap font that I made in 1998. To celebrate this fun coincidence I shall rush this new API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants