Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for SmbEndOfFileException (0.09 sec)

  1. src/main/java/jcifs/smb/SmbEndOfFileException.java

     * attempting to read beyond the end of a file.
     *
     * @author mbechler
     */
    public class SmbEndOfFileException extends SmbException {
    
        /**
         *
         */
        private static final long serialVersionUID = 298752101881244000L;
    
        /**
         * Constructs an end-of-file exception.
         */
        public SmbEndOfFileException() {
            super("Unexpectedly reached end of file");
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 1.3K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb/SmbEndOfFileExceptionTest.java

         */
        @Test
        void assertThrowsCapturesExceptionAndMessage() {
            // Act & Assert
            SmbEndOfFileException thrown = assertThrows(SmbEndOfFileException.class, () -> {
                throw new SmbEndOfFileException();
            });
            assertEquals("Unexpectedly reached end of file", thrown.getMessage());
        }
    
        /**
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 2.4K bytes
    - Viewed (0)
  3. src/main/java/jcifs/smb/SmbRandomAccessFile.java

            if (read(this.tmp, 0, 1) < 0) {
                throw new SmbEndOfFileException();
            }
            return this.tmp[0] != (byte) 0x00;
        }
    
        @Override
        public final byte readByte() throws SmbException {
            if (read(this.tmp, 0, 1) < 0) {
                throw new SmbEndOfFileException();
            }
            return this.tmp[0];
        }
    
        @Override
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 18.8K bytes
    - Viewed (0)
  4. src/test/java/jcifs/smb/SmbRandomAccessFileTest.java

        }
    
        @Test
        @DisplayName("readFully(): throws SmbEndOfFileException on premature EOF")
        void readFully_throws_onEOF() throws Exception {
            SmbRandomAccessFile raf = spy(newInstance("r", false, false, false));
            doReturn(-1).when(raf).read(any(byte[].class), anyInt(), anyInt());
            assertThrows(SmbEndOfFileException.class, () -> raf.readFully(new byte[4]));
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.1K bytes
    - Viewed (0)
Back to top