- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 626 for readn (0.02 sec)
-
src/test/java/jcifs/netbios/SessionServicePacketTest.java
when(mockInputStream.read(any(byte[].class), anyInt(), anyInt())).thenReturn(2) // First read returns 2 bytes .thenReturn(2) // Second read returns 2 bytes .thenReturn(1); // Third read returns 1 byte byte[] buffer = new byte[10]; int bytesRead = SessionServicePacket.readn(mockInputStream, buffer, 0, 5); assertEquals(5, bytesRead);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 15.5K bytes - Viewed (0) -
src/main/java/jcifs/smb1/smb1/SmbTransport.java
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 16 01:32:48 UTC 2025 - 31.8K bytes - Viewed (0) -
src/test/java/jcifs/util/transport/TransportTest.java
InputStream is = new ByteArrayInputStream("Hi".getBytes()); byte[] buffer = new byte[10]; Transport.readn(is, buffer, 0, 2); // Read all int bytesRead = Transport.readn(is, buffer, 0, 5); // Try to read more assertEquals(0, bytesRead); } } @Nested @DisplayName("Resource management tests")
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 9.5K bytes - Viewed (0) -
src/main/java/jcifs/netbios/SessionServicePacket.java
return ((src[srcIndex++] & 0x01) << 16) + ((src[srcIndex++] & 0xFF) << 8) + (src[srcIndex++] & 0xFF); } static int readn(final InputStream in, final byte[] b, final int off, final int len) throws IOException { int i = 0, n; while (i < len) { n = in.read(b, off + i, len - i); if (n <= 0) { break; } i += n; }
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 16 01:32:48 UTC 2025 - 5.2K bytes - Viewed (0) -
src/main/java/jcifs/smb1/netbios/SessionServicePacket.java
return ((src[srcIndex++] & 0x01) << 16) + ((src[srcIndex++] & 0xFF) << 8) + (src[srcIndex++] & 0xFF); } static int readn(final InputStream in, final byte[] b, final int off, final int len) throws IOException { int i = 0, n; while (i < len) { n = in.read(b, off + i, len - i); if (n <= 0) { break; } i += n; }
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 16 01:32:48 UTC 2025 - 5.2K bytes - Viewed (0) -
src/main/java/jcifs/smb/SmbTransportImpl.java
} @Override protected Long peekKey() throws IOException { do { if (readn(this.in, this.sbuf, 0, 4) < 4) { return null; } } while (this.sbuf[0] == (byte) 0x85); /* Dodge NetBIOS keep-alive */ /* read smb header */ if (readn(this.in, this.sbuf, 4, SmbConstants.SMB1_HEADER_LENGTH) < SmbConstants.SMB1_HEADER_LENGTH) { return null;
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 30 05:58:03 UTC 2025 - 69.8K bytes - Viewed (0) -
src/main/java/jcifs/smb1/util/transport/Transport.java
static LogStream log = LogStream.getInstance(); /** * Reads exactly len bytes from the input stream into the buffer. * * @param in the input stream to read from * @param b the buffer to read into * @param off the offset in the buffer to start writing * @param len the number of bytes to read * @return the number of bytes actually read * @throws IOException if an I/O error occurs */
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 16 01:32:48 UTC 2025 - 11.3K bytes - Viewed (0) -
src/main/java/jcifs/util/transport/Transport.java
/** * Read bytes from the input stream into a buffer * * @param in the input stream to read from * @param b the buffer to read into * @param off the offset in the buffer to start writing * @param len the number of bytes to read * @return number of bytes read * @throws IOException if an I/O error occurs */
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 27.8K bytes - Viewed (0) -
cmd/metacache-set.go
}) if (err != nil && errors.Is(err, io.EOF)) || pastPrefix || r.nextEOF() { return entries, io.EOF } return entries, err } // We should not need to filter more. return r.readN(o.Limit, o.InclDeleted, o.IncludeDirectories, o.Versioned, o.Prefix) } func (er *erasureObjects) streamMetadataParts(ctx context.Context, o listPathOptions) (entries metaCacheEntriesSorted, err error) { retries := 0
Registered: Sun Sep 07 19:28:11 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 30.7K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/tree/Smb2TreeDisconnectResponseTest.java
int read3 = response.readBytesWireFormat(buffer, 0); // Then - all reads should return same result assertEquals(4, read1); assertEquals(4, read2); assertEquals(4, read3); } @Test @DisplayName("Should validate structure size before processing") void testStructureSizeValidation() { // Given various invalid structure sizes
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 14.1K bytes - Viewed (0)