NioLineCount: indent fixed

This commit is contained in:
Karsten Jeppesen
2021-04-16 11:50:21 +02:00
parent 58e8ea943c
commit c2d7b058b1

View File

@@ -46,18 +46,18 @@ public class NioLineCount {
public void completed(Integer result, ByteBuffer attachment) { public void completed(Integer result, ByteBuffer attachment) {
// System.out.println("Result = " + result + " Limit = " + attachment.limit()); // System.out.println("Result = " + result + " Limit = " + attachment.limit());
if ( result != -1 ) { if ( result != -1 ) {
attachment.flip(); attachment.flip();
byte[] data = new byte[attachment.limit()]; byte[] data = new byte[attachment.limit()];
attachment.get( data ); attachment.get( data );
//System.out.println(new String(data)); //System.out.println(new String(data));
for (int i = 0; i < data.length; i++ ) { for (int i = 0; i < data.length; i++ ) {
if ( data[i] == '\n' ) if ( data[i] == '\n' )
theCount++; theCount++;
//System.out.println("data: " + data[i]); //System.out.println("data: " + data[i]);
} }
// System.out.println("position: " + readPosition + " Count: " + theCount); // System.out.println("position: " + readPosition + " Count: " + theCount);
readPosition += data.length; readPosition += data.length;
attachment.clear(); attachment.clear();
} else { } else {
doContinue = false; doContinue = false;
} }