Skip to content

[SPARK-3442] LengthBoundedInputStream#2321

Closed
rxin wants to merge 1 commit intoapache:masterfrom
rxin:LengthBoundedInputStream
Closed

[SPARK-3442] LengthBoundedInputStream#2321
rxin wants to merge 1 commit intoapache:masterfrom
rxin:LengthBoundedInputStream

Conversation

@rxin
Copy link
Contributor

@rxin rxin commented Sep 8, 2014

This commit creates LengthBoundedInputStream, an InputStream decorator that limits the number of bytes returned from an underlying InputStream. This will be used to create an InputStream directly from a segment of a file (FileInputStream always reads till EOF).

This commit creates LengthBoundedInputStream, an InputStream decorator that limits the number of bytes returned from an underlying InputStream. This will be used to create an InputStream directly from a segment of a file (FileInputStream always reads till EOF).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like you could implement these 3 methods without much trouble, no?

@pwendell
Copy link
Contributor

pwendell commented Sep 8, 2014

I'd use ByteStream.limit()... we already use it in EAOM.

@rxin
Copy link
Contributor Author

rxin commented Sep 8, 2014

Good find! Going to close this in favor of the Guava thing.

@rxin rxin closed this Sep 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants