[ 
https://issues.apache.org/jira/browse/IO-670?focusedWorklogId=466731&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-466731
 ]

ASF GitHub Bot logged work on IO-670:
-------------------------------------

                Author: ASF GitHub Bot
            Created on: 05/Aug/20 10:49
            Start Date: 05/Aug/20 10:49
    Worklog Time Spent: 10m 
      Work Description: sebbASF commented on a change in pull request #118:
URL: https://github.com/apache/commons-io/pull/118#discussion_r465638699



##########
File path: 
src/main/java/org/apache/commons/io/input/buffer/UnsyncBufferedInputStream.java
##########
@@ -0,0 +1,207 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package org.apache.commons.io.input.buffer;
+
+import java.io.IOException;
+import java.io.InputStream;
+import org.apache.commons.io.IOUtils;
+import static org.apache.commons.io.IOUtils.EOF;
+
+/**
+ * A BufferedReader class who does not care about thread safety, but very much 
faster.
+ *
+ * Should be able to replace java.io.BufferedReader in nearly every use-cases 
when you
+ * need the Reader be buffered, but do not need it have thread safety.
+ */
+public class UnsyncBufferedInputStream extends InputStream {
+    protected final InputStream inputStream;
+    protected final byte[] byteBuffer;
+
+    protected int nowIndex = 0;
+    protected int nowLimit = 0;
+

Review comment:
       AFAICT UnsyncBufferedInputStream does not need to expose any 
getter/setter methods, not does it need to expose eat().
   As to UnsyncBufferedReader, AFAICT LineEndUnifiedBufferedReader could be 
rewritten to act as a Filter which would then make it more versatile.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 466731)
    Time Spent: 9h 50m  (was: 9h 40m)

> IOUtils.contentEquals is of low performance. I will refine it.
> --------------------------------------------------------------
>
>                 Key: IO-670
>                 URL: https://issues.apache.org/jira/browse/IO-670
>             Project: Commons IO
>          Issue Type: Improvement
>            Reporter: Jin Xu
>            Priority: Critical
>         Attachments: jmh-result.org.apache.json
>
>          Time Spent: 9h 50m
>  Remaining Estimate: 0h
>
> [https://github.com/apache/commons-io/pull/118]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to