You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/08/08 15:01:00 UTC
[jira] [Work logged] (IO-543) ReversedLinesFileReader with 'getFilePointer' and 'seek' API
[ https://issues.apache.org/jira/browse/IO-543?focusedWorklogId=798975&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-798975 ]
ASF GitHub Bot logged work on IO-543:
-------------------------------------
Author: ASF GitHub Bot
Created on: 08/Aug/22 15:00
Start Date: 08/Aug/22 15:00
Worklog Time Spent: 10m
Work Description: garydgregory commented on code in PR #39:
URL: https://github.com/apache/commons-io/pull/39#discussion_r940345283
##########
src/main/java/org/apache/commons/io/input/ReversedLinesFileReader.java:
##########
@@ -211,6 +228,8 @@ private class FilePart {
private byte[] leftOver;
private int currentLastBytePos;
+ private int mappedFilePointer; // store file pointer position according to currentLastBytePos but take
Review Comment:
Just a Javadoc comment instead.
##########
src/main/java/org/apache/commons/io/input/ReversedLinesFileReader.java:
##########
@@ -303,6 +323,7 @@ private String readLine() throws IOException {
line = new String(lineData, encoding);
currentLastBytePos = i - newLineMatchByteCount;
+ mappedFilePointer=i;
Review Comment:
Fix formatting.
Issue Time Tracking
-------------------
Worklog Id: (was: 798975)
Time Spent: 20m (was: 10m)
> ReversedLinesFileReader with 'getFilePointer' and 'seek' API
> ------------------------------------------------------------
>
> Key: IO-543
> URL: https://issues.apache.org/jira/browse/IO-543
> Project: Commons IO
> Issue Type: Improvement
> Affects Versions: 2.6
> Reporter: Jean-Pierre Portier
> Priority: Minor
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Adding API to get/set current file pointer position for org.apache.commons.io.input.ReversedLinesFileReader class:
> - long getFilePointer()
> - void seek(long pos)
> (they act like java.io.RandomAccessFile API class)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)