Skip to content

Commit 30f8517

Browse files
committed
Remove couple unused methods
1 parent db06302 commit 30f8517

File tree

5 files changed

+3
-40
lines changed

5 files changed

+3
-40
lines changed

driver/src/main/java/org/neo4j/driver/internal/messaging/MessageFormat.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ interface Writer
2929
Writer write( Message msg ) throws IOException;
3030

3131
Writer flush() throws IOException;
32-
33-
Writer reset( WritableByteChannel channel );
3432
}
3533

3634
interface Reader

driver/src/main/java/org/neo4j/driver/internal/messaging/PackStreamMessageFormatV1.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -345,13 +345,6 @@ public Writer write( Message msg ) throws IOException
345345
return this;
346346
}
347347

348-
@Override
349-
public Writer reset( WritableByteChannel channel )
350-
{
351-
packer.reset( channel );
352-
return this;
353-
}
354-
355348
private void packNode( Node node ) throws IOException
356349
{
357350
packer.packStructHeader( NODE_FIELDS, NODE );

driver/src/main/java/org/neo4j/driver/internal/packstream/BufferedChannelInput.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,8 @@ public BufferedChannelInput(ReadableByteChannel ch )
4040
public BufferedChannelInput( int bufferCapacity, ReadableByteChannel ch )
4141
{
4242
this.buffer = ByteBuffer.allocate( bufferCapacity ).order( ByteOrder.BIG_ENDIAN );
43-
reset( ch );
44-
}
45-
46-
public BufferedChannelInput reset( ReadableByteChannel ch )
47-
{
48-
this.channel = ch;
49-
this.buffer.position( 0 );
5043
this.buffer.limit( 0 );
51-
return this;
44+
this.channel = ch;
5245
}
5346

5447
@Override

driver/src/main/java/org/neo4j/driver/internal/packstream/BufferedChannelOutput.java

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,7 @@
2626
public class BufferedChannelOutput implements PackOutput
2727
{
2828
private final ByteBuffer buffer;
29-
private WritableByteChannel channel;
30-
31-
public BufferedChannelOutput( int bufferSize )
32-
{
33-
this.buffer = ByteBuffer.allocate( bufferSize ).order( ByteOrder.BIG_ENDIAN );
34-
}
29+
private final WritableByteChannel channel;
3530

3631
public BufferedChannelOutput( WritableByteChannel channel )
3732
{
@@ -40,12 +35,7 @@ public BufferedChannelOutput( WritableByteChannel channel )
4035

4136
public BufferedChannelOutput( WritableByteChannel channel, int bufferSize )
4237
{
43-
this( bufferSize );
44-
reset( channel );
45-
}
46-
47-
public void reset( WritableByteChannel channel )
48-
{
38+
this.buffer = ByteBuffer.allocate( bufferSize ).order( ByteOrder.BIG_ENDIAN );
4939
this.channel = channel;
5040
}
5141

driver/src/main/java/org/neo4j/driver/internal/packstream/PackStream.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
package org.neo4j.driver.internal.packstream;
2020

2121
import java.io.IOException;
22-
import java.nio.channels.WritableByteChannel;
2322
import java.nio.charset.Charset;
2423
import java.util.List;
2524
import java.util.Map;
@@ -158,16 +157,6 @@ public Packer( PackOutput out )
158157
this.out = out;
159158
}
160159

161-
public void reset( PackOutput out )
162-
{
163-
this.out = out;
164-
}
165-
166-
public void reset( WritableByteChannel channel )
167-
{
168-
((BufferedChannelOutput) out).reset( channel );
169-
}
170-
171160
public void flush() throws IOException
172161
{
173162
out.flush();

0 commit comments

Comments
 (0)