MCPcopy Index your code
hub / github.com/Q16G/memory-shell / readFully

Method readFully

src/main/java/org/example/Socks5Server.java:265–271  ·  view source on GitHub ↗
(SocketChannel channel, ByteBuffer buffer)

Source from the content-addressed store, hash-verified

263 }
264
265 private void readFully(SocketChannel channel, ByteBuffer buffer) throws IOException {
266 while (buffer.hasRemaining()) {
267 if (channel.read(buffer) == -1) {
268 throw new IOException("连接已关闭");
269 }
270 }
271 }
272
273 private void writeFully(SocketChannel channel, ByteBuffer buffer) throws IOException {
274 while (buffer.hasRemaining()) {

Callers 1

Calls 1

readMethod · 0.80

Tested by

no test coverage detected