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
29
29
Writer write ( Message msg ) throws IOException ;
30
30
31
31
Writer flush () throws IOException ;
32
-
33
- Writer reset ( WritableByteChannel channel );
34
32
}
35
33
36
34
interface Reader
Original file line number Diff line number Diff line change @@ -345,13 +345,6 @@ public Writer write( Message msg ) throws IOException
345
345
return this ;
346
346
}
347
347
348
- @ Override
349
- public Writer reset ( WritableByteChannel channel )
350
- {
351
- packer .reset ( channel );
352
- return this ;
353
- }
354
-
355
348
private void packNode ( Node node ) throws IOException
356
349
{
357
350
packer .packStructHeader ( NODE_FIELDS , NODE );
Original file line number Diff line number Diff line change @@ -40,15 +40,8 @@ public BufferedChannelInput(ReadableByteChannel ch )
40
40
public BufferedChannelInput ( int bufferCapacity , ReadableByteChannel ch )
41
41
{
42
42
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 );
50
43
this .buffer .limit ( 0 );
51
- return this ;
44
+ this . channel = ch ;
52
45
}
53
46
54
47
@ Override
Original file line number Diff line number Diff line change 26
26
public class BufferedChannelOutput implements PackOutput
27
27
{
28
28
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 ;
35
30
36
31
public BufferedChannelOutput ( WritableByteChannel channel )
37
32
{
@@ -40,12 +35,7 @@ public BufferedChannelOutput( WritableByteChannel channel )
40
35
41
36
public BufferedChannelOutput ( WritableByteChannel channel , int bufferSize )
42
37
{
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 );
49
39
this .channel = channel ;
50
40
}
51
41
Original file line number Diff line number Diff line change 19
19
package org .neo4j .driver .internal .packstream ;
20
20
21
21
import java .io .IOException ;
22
- import java .nio .channels .WritableByteChannel ;
23
22
import java .nio .charset .Charset ;
24
23
import java .util .List ;
25
24
import java .util .Map ;
@@ -158,16 +157,6 @@ public Packer( PackOutput out )
158
157
this .out = out ;
159
158
}
160
159
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
-
171
160
public void flush () throws IOException
172
161
{
173
162
out .flush ();
You can’t perform that action at this time.
0 commit comments