{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/1793","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/1793/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/1793/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/1793/events","html_url":"https://github.com/dotnet/corefx/issues/1793","id":78173820,"number":1793,"title":"Please add support for BufferedStream type in .NET Core","user":{"login":"abhishekram","id":11345138,"avatar_url":"https://avatars.githubusercontent.com/u/11345138?v=3","gravatar_id":"","url":"https://api.github.com/users/abhishekram","html_url":"https://github.com/abhishekram","followers_url":"https://api.github.com/users/abhishekram/followers","following_url":"https://api.github.com/users/abhishekram/following{/other_user}","gists_url":"https://api.github.com/users/abhishekram/gists{/gist_id}","starred_url":"https://api.github.com/users/abhishekram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abhishekram/subscriptions","organizations_url":"https://api.github.com/users/abhishekram/orgs","repos_url":"https://api.github.com/users/abhishekram/repos","events_url":"https://api.github.com/users/abhishekram/events{/privacy}","received_events_url":"https://api.github.com/users/abhishekram/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/corefx/labels/api-needs-work","name":"api-needs-work","color":"207de5"},{"url":"https://api.github.com/repos/dotnet/corefx/labels/System.IO","name":"System.IO","color":"d4c5f9"}],"state":"open","locked":false,"assignee":{"login":"ianhays","id":2606879,"avatar_url":"https://avatars.githubusercontent.com/u/2606879?v=3","gravatar_id":"","url":"https://api.github.com/users/ianhays","html_url":"https://github.com/ianhays","followers_url":"https://api.github.com/users/ianhays/followers","following_url":"https://api.github.com/users/ianhays/following{/other_user}","gists_url":"https://api.github.com/users/ianhays/gists{/gist_id}","starred_url":"https://api.github.com/users/ianhays/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianhays/subscriptions","organizations_url":"https://api.github.com/users/ianhays/orgs","repos_url":"https://api.github.com/users/ianhays/repos","events_url":"https://api.github.com/users/ianhays/events{/privacy}","received_events_url":"https://api.github.com/users/ianhays/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/dotnet/corefx/milestones/6","html_url":"https://github.com/dotnet/corefx/milestones/1.0.0-rc2","labels_url":"https://api.github.com/repos/dotnet/corefx/milestones/6/labels","id":1365455,"number":6,"title":"1.0.0-rc2","description":"","creator":{"login":"joshfree","id":1302850,"avatar_url":"https://avatars.githubusercontent.com/u/1302850?v=3","gravatar_id":"","url":"https://api.github.com/users/joshfree","html_url":"https://github.com/joshfree","followers_url":"https://api.github.com/users/joshfree/followers","following_url":"https://api.github.com/users/joshfree/following{/other_user}","gists_url":"https://api.github.com/users/joshfree/gists{/gist_id}","starred_url":"https://api.github.com/users/joshfree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshfree/subscriptions","organizations_url":"https://api.github.com/users/joshfree/orgs","repos_url":"https://api.github.com/users/joshfree/repos","events_url":"https://api.github.com/users/joshfree/events{/privacy}","received_events_url":"https://api.github.com/users/joshfree/received_events","type":"User","site_admin":false},"open_issues":74,"closed_issues":32,"state":"open","created_at":"2015-10-20T04:29:15Z","updated_at":"2015-11-04T22:00:50Z","due_on":"2016-02-01T08:00:00Z","closed_at":null},"comments":12,"created_at":"2015-05-19T17:11:58Z","updated_at":"2015-11-05T00:37:28Z","closed_at":null,"body":"We have a scenario where we implement our own stream and use the BufferedStream class to add a buffering layer on top of it."},"comment":{"url":"https://api.github.com/repos/dotnet/corefx/issues/comments/153916118","html_url":"https://github.com/dotnet/corefx/issues/1793#issuecomment-153916118","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/1793","id":153916118,"user":{"login":"ianhays","id":2606879,"avatar_url":"https://avatars.githubusercontent.com/u/2606879?v=3","gravatar_id":"","url":"https://api.github.com/users/ianhays","html_url":"https://github.com/ianhays","followers_url":"https://api.github.com/users/ianhays/followers","following_url":"https://api.github.com/users/ianhays/following{/other_user}","gists_url":"https://api.github.com/users/ianhays/gists{/gist_id}","starred_url":"https://api.github.com/users/ianhays/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianhays/subscriptions","organizations_url":"https://api.github.com/users/ianhays/orgs","repos_url":"https://api.github.com/users/ianhays/repos","events_url":"https://api.github.com/users/ianhays/events{/privacy}","received_events_url":"https://api.github.com/users/ianhays/received_events","type":"User","site_admin":false},"created_at":"2015-11-05T00:37:28Z","updated_at":"2015-11-05T00:37:28Z","body":"There is the question of where to put it that I would like to get some discussion on. Some options:\r\n- It currently lives in mscorlib but isn't exposed in the core build. We could toggle it to be exposed by modifying the models.xml file to not hide it.\r\n- Move the code to CoreFX and put it in System.IO\r\n- Move the code to CoreFX and put it somewhere else\r\n\r\nThe proposed API contains two non-inherited/overridden methods and they're both constructors that wrap around Stream:\r\n```\r\n    public sealed class BufferedStream : Stream {\r\n        public BufferedStream(Stream stream);\r\n        public BufferedStream(Stream stream, int bufferSize);\r\n        public override bool CanRead { get; }\r\n        public override bool CanSeek { get; }\r\n        public override bool CanWrite { get; }\r\n        public override long Length { get; }\r\n        public override long Position { get; set; }\r\n        public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state);\r\n        public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state);\r\n        protected override void Dispose(bool disposing);\r\n        public override int EndRead(IAsyncResult asyncResult);\r\n        public override void EndWrite(IAsyncResult asyncResult);\r\n        public override void Flush();\r\n        public override Task FlushAsync(CancellationToken cancellationToken);\r\n        public override int Read(byte[] array, int offset, int count);\r\n        public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken);\r\n        public override int ReadByte();\r\n        public override long Seek(long offset, SeekOrigin origin);\r\n        public override void SetLength(long value);\r\n        public override void Write(byte[] array, int offset, int count);\r\n        public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken);\r\n        public override void WriteByte(byte value);\r\n    }\r\n```"}}