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

Add mark/reset functionality to BufferInputStream #2447

Conversation

bobbyowolabi
Copy link
Contributor

@bobbyowolabi bobbyowolabi commented Nov 28, 2022

Motivation:
BufferInputStream can support the mark/reset functionality, as noted in #1562, like ByteArrayInputStream and ByteBufInputStream (from netty).

Modifications:

  • Implemented the mark, reset and markSupported methods of BufferInputStream
  • Added test cases

Result:
Resolves #1562.

@bobbyowolabi bobbyowolabi changed the title [WIP] Added mark/reset functionality to BufferInputStream. [WIP] Added mark/reset functionality to BufferInputStream Nov 28, 2022
@idelpivnitskiy idelpivnitskiy self-requested a review November 30, 2022 17:35
Copy link
Member

@idelpivnitskiy idelpivnitskiy left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @bobbyowolabi!

@bobbyowolabi bobbyowolabi force-pushed the bobbyowolabi/1562-bufferedinputstream-mark-reset-support branch 3 times, most recently from 128bdf4 to c2f1727 Compare December 1, 2022 00:00
@bobbyowolabi
Copy link
Contributor Author

bobbyowolabi commented Dec 1, 2022

Thank you for your time to review and all the feedback. I made updates for all the suggestions.

Motivation:
BufferInputStream can support the mark/reset functionality with not too much additional logic like ByteArrayInputStream and ByteBufInputStream (from netty).

Modifications:
- Implemented the mark, reset and markSupported methods of BufferInputStream
- Added test cases

Result:
Addresses apple#1562
@bobbyowolabi bobbyowolabi force-pushed the bobbyowolabi/1562-bufferedinputstream-mark-reset-support branch from c2f1727 to d4454a3 Compare December 1, 2022 05:28
@idelpivnitskiy idelpivnitskiy changed the title [WIP] Added mark/reset functionality to BufferInputStream Add mark/reset functionality to BufferInputStream Dec 2, 2022
Copy link
Member

@idelpivnitskiy idelpivnitskiy left a comment

Choose a reason for hiding this comment

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

Looks sparkling clean now. Thanks for the contribution, @bobbyowolabi!

@idelpivnitskiy idelpivnitskiy merged commit 080d6a0 into apple:main Dec 2, 2022
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.

BufferInputStream should support mark/reset
2 participants