File tree Expand file tree Collapse file tree 3 files changed +2
-15
lines changed
src/main/java/com/maxmind/db Expand file tree Collapse file tree 3 files changed +2
-15
lines changed Original file line number Diff line number Diff line change @@ -114,11 +114,4 @@ interface Buffer {
114114 * @throws CharacterCodingException if decoding fails
115115 */
116116 String decode (CharsetDecoder decoder ) throws CharacterCodingException ;
117-
118- /**
119- * Creates a read-only view of this buffer.
120- *
121- * @return a read-only buffer
122- */
123- Buffer asReadOnlyBuffer ();
124117}
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ final class BufferHolder {
2424 + database .getName ()
2525 + " into memory. Unexpected end of stream." );
2626 }
27- this .buffer = buf . asReadOnlyBuffer () ;
27+ this .buffer = buf ;
2828 } else {
2929 this .buffer = SingleBuffer .mapFromChannel (channel );
3030 }
@@ -48,7 +48,7 @@ final class BufferHolder {
4848 while (-1 != (br = stream .read (bytes ))) {
4949 baos .write (bytes , 0 , br );
5050 }
51- this .buffer = SingleBuffer .wrap (baos .toByteArray ()). asReadOnlyBuffer () ;
51+ this .buffer = SingleBuffer .wrap (baos .toByteArray ());
5252 }
5353
5454 /*
Original file line number Diff line number Diff line change @@ -124,12 +124,6 @@ public String decode(CharsetDecoder decoder)
124124 return decoder .decode (buffer ).toString ();
125125 }
126126
127- /** {@inheritDoc} */
128- @ Override
129- public SingleBuffer asReadOnlyBuffer () {
130- return new SingleBuffer (buffer .asReadOnlyBuffer ());
131- }
132-
133127 /**
134128 * Wraps the given byte array in a new {@code SingleBuffer}.
135129 *
You can’t perform that action at this time.
0 commit comments