File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
src/main/java/com/codingchili/Model Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 66import org .reactivestreams .Subscription ;
77
88import java .io .*;
9- import java .nio .ByteBuffer ;
10- import java .nio .MappedByteBuffer ;
9+ import java .nio .*;
1110import java .nio .channels .FileChannel ;
1211import java .util .*;
1312import java .util .concurrent .atomic .AtomicInteger ;
@@ -79,7 +78,7 @@ private byte get() {
7978 private void reset () {
8079 index = 0 ;
8180 row = 0 ;
82- for (MappedByteBuffer map : maps ) {
81+ for (Buffer map : maps ) {
8382 map .position (0 );
8483 }
8584 }
@@ -135,7 +134,7 @@ private void readHeaders() {
135134 buffer .put (current );
136135 }
137136 }
138- buffer .clear ();
137+ (( Buffer ) buffer ) .clear ();
139138 }
140139
141140 private void process (AtomicInteger columnsRead , JsonObject json ) {
@@ -148,7 +147,7 @@ private void process(AtomicInteger columnsRead, JsonObject json) {
148147 int read = buffer .position ();
149148 byte [] line = new byte [read + 1 ];
150149
151- buffer .position (0 );
150+ (( Buffer ) buffer ) .position (0 );
152151 buffer .get (line , 0 , read );
153152 line [line .length - 1 ] = '\0' ;
154153
@@ -157,7 +156,7 @@ private void process(AtomicInteger columnsRead, JsonObject json) {
157156 // skip parsing the content - just verify the format.
158157 header .next ();
159158 }
160- buffer .clear ();
159+ (( Buffer ) buffer ) .clear ();
161160 }
162161 }
163162
You can’t perform that action at this time.
0 commit comments