Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 2 of 2 for validateBuffer (0.11 seconds)

  1. src/main/java/jcifs/util/ServerResponseValidator.java

         *
         * @param buffer the buffer to validate
         * @param expectedSize expected minimum size
         * @param maxSize maximum allowed size
         * @throws SmbException if validation fails
         */
        public void validateBuffer(byte[] buffer, int expectedSize, int maxSize) throws SmbException {
            totalValidations.incrementAndGet();
    
            if (buffer == null) {
                failedValidations.incrementAndGet();
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 30 05:58:03 GMT 2025
    - 16.6K bytes
    - Click Count (0)
  2. src/test/java/jcifs/util/ServerResponseValidatorTest.java

        public void testValidBuffer() throws Exception {
            byte[] buffer = new byte[1024];
            validator.validateBuffer(buffer, 100, 2048);
            // Should pass without exception
        }
    
        @Test
        public void testNullBuffer() throws Exception {
            assertThrows(SmbException.class, () -> {
                validator.validateBuffer(null, 100, 1024);
            });
        }
    
        @Test
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 30 05:58:03 GMT 2025
    - 14.2K bytes
    - Click Count (0)
Back to Top