Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for readLength (1.29 sec)

  1. src/main/java/jcifs/internal/smb2/io/Smb2ReadRequest.java

            this.readFlags = readFlags;
        }
    
        /**
         * Sets the number of bytes to read
         *
         * @param readLength
         *            the readLength to set
         */
        public void setReadLength(final int readLength) {
            this.readLength = readLength;
        }
    
        /**
         * Sets the file offset from which to start reading
         *
         * @param offset
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 23 05:11:12 UTC 2025
    - 7.8K bytes
    - Viewed (0)
  2. src/test/java/jcifs/pac/ASN1UtilTest.java

                ASN1Util.readTagNumber(s, 0x1F);
            });
        }
    
        // --- readLength ---
    
        @Test
        void testReadLength_ShortForm() throws IOException {
            // Definite-length short form (length 10)
            InputStream s = new ByteArrayInputStream(new byte[] { 0x0A });
            int length = ASN1Util.readLength(s, 100, false);
            assertEquals(10, length);
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.4K bytes
    - Viewed (0)
  3. src/test/java/jcifs/netbios/SessionServicePacketTest.java

        @Test
        @DisplayName("readLength should handle maximum length")
        void testReadLengthMaximum() {
            byte[] src = { (byte) 0x00, (byte) 0x01, (byte) 0xFF, (byte) 0xFF };
            int length = SessionServicePacket.readLength(src, 0);
    
            assertEquals(0x01FFFF, length);
        }
    
        @Test
        @DisplayName("readLength should handle zero length")
        void testReadLengthZero() {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.5K bytes
    - Viewed (0)
  4. src/main/java/jcifs/netbios/SessionServicePacket.java

            return ((src[srcIndex] & 0xFF) << 24) + ((src[srcIndex + 1] & 0xFF) << 16) + ((src[srcIndex + 2] & 0xFF) << 8)
                    + (src[srcIndex + 3] & 0xFF);
        }
    
        static int readLength(final byte[] src, int srcIndex) {
            srcIndex++;
            return ((src[srcIndex++] & 0x01) << 16) + ((src[srcIndex++] & 0xFF) << 8) + (src[srcIndex++] & 0xFF);
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 5.2K bytes
    - Viewed (0)
  5. src/main/java/jcifs/pac/ASN1Util.java

            final int ftag = in.read();
            final int tag = readTagNumber(in, ftag);
            if (tag != expectTag) {
                throw new IOException("Unexpected tag " + tag);
            }
            final int length = readLength(in, limit, false);
            final byte[] content = new byte[length];
            in.read(content);
            return content;
        }
    
        // shamelessly stolen from BC ASN1InputStream
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 8.2K bytes
    - Viewed (0)
  6. src/main/java/jcifs/smb1/netbios/SocketInputStream.java

                case SessionServicePacket.SESSION_KEEP_ALIVE:
                    break;
                case SessionServicePacket.SESSION_MESSAGE:
                    bip = SessionServicePacket.readLength(header, 0);
                    break;
                case -1:
                    if (tot > 0) {
                        return tot;
                    }
                    return -1;
                }
            }
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 3.3K bytes
    - Viewed (0)
  7. src/main/java/jcifs/smb1/netbios/SessionServicePacket.java

            return ((src[srcIndex] & 0xFF) << 24) + ((src[srcIndex + 1] & 0xFF) << 16) + ((src[srcIndex + 2] & 0xFF) << 8)
                    + (src[srcIndex + 3] & 0xFF);
        }
    
        static int readLength(final byte[] src, int srcIndex) {
            srcIndex++;
            return ((src[srcIndex++] & 0x01) << 16) + ((src[srcIndex++] & 0xFF) << 8) + (src[srcIndex++] & 0xFF);
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 5.2K bytes
    - Viewed (0)
  8. src/test/java/jcifs/netbios/NodeStatusRequestTest.java

            assertTrue(writeLength > 0);
    
            // Create new request to read
            NodeStatusRequest readRequest = new NodeStatusRequest(mockConfig, new Name(mockConfig));
    
            // Act - Read
            int readLength = readRequest.readWireFormat(buffer, 0);
    
            // Assert read
            assertEquals(0x1234, readRequest.nameTrnId);
            assertEquals(NameServicePacket.NBSTAT, readRequest.questionType);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 13.9K bytes
    - Viewed (0)
Back to top