File tree Expand file tree Collapse file tree 5 files changed +3
-40
lines changed
driver/src/main/java/org/neo4j/driver/internal Expand file tree Collapse file tree 5 files changed +3
-40
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 );
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 2626public 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
Original file line number Diff line number Diff line change 1919package org .neo4j .driver .internal .packstream ;
2020
2121import java .io .IOException ;
22- import java .nio .channels .WritableByteChannel ;
2322import java .nio .charset .Charset ;
2423import java .util .List ;
2524import 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 ();
You can’t perform that action at this time.
0 commit comments