Skip to content
Snippets Groups Projects
Commit 5b4daebb authored by Florian Fittkau's avatar Florian Fittkau
Browse files

minor

parent 9c963c0d
No related branches found
No related tags found
No related merge requests found
......@@ -46,14 +46,11 @@ public class TCPReaderOneClient extends Thread implements IPeriodicTimeSignalRec
@Override
public void run() {
ByteBuffer buffer = ByteBuffer.allocateDirect(2 * 1024 * 1024);
final ByteBuffer buffer = ByteBuffer.allocateDirect(2 * 1024 * 1024);
try {
while ((socketChannel.read(buffer)) != -1) {
buffer.flip();
messagesfromByteArray(buffer);
if (buffer.capacity() == buffer.position()) {
buffer = ByteBuffer.allocateDirect(2 * buffer.capacity());
}
}
} catch (final IOException ex) {
System.out.println("Error in read() " + ex.getMessage());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment