Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for _seek (0.03 sec)

  1. src/main/java/jcifs/internal/smb1/com/SmbComSeekResponse.java

    import jcifs.internal.util.SMBUtil;
    
    /**
     * SMB1 Seek command response implementation.
     * Handles server responses to file seek operations, returning the new file
     * position after a seek request in SMB1 protocol file operations.
     *
     * @author mbechler
     */
    public class SmbComSeekResponse extends ServerMessageBlock {
    
        private long offset;
    
        /**
         * Constructs a seek response.
         *
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 2.8K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb1/smb1/SmbRandomAccessFileTest.java

            long newPosition = 100L;
            smbRandomAccessFile.seek(newPosition);
            assertEquals(newPosition, smbRandomAccessFile.getFilePointer());
        }
    
        @Test
        void testSeekNegativePosition() throws SmbException {
            // seek doesn't throw exception for negative position, it just sets it
            smbRandomAccessFile.seek(-1);
            assertEquals(-1, smbRandomAccessFile.getFilePointer());
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.3K bytes
    - Viewed (0)
  3. src/main/java/jcifs/internal/smb1/com/SmbComSeek.java

         */
        public void setFid(final int fid) {
            this.fid = fid;
        }
    
        /**
         * Sets the seek mode.
         *
         * @param mode
         *            the mode to set
         */
        public final void setMode(final int mode) {
            this.mode = mode;
        }
    
        /**
         * Sets the seek offset.
         *
         * @param offset
         *            the offset to set
         */
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 3.4K bytes
    - Viewed (0)
  4. src/main/java/jcifs/SmbRandomAccess.java

        /**
         * Current position in file
         *
         * @return current position
         */
        long getFilePointer();
    
        /**
         * Seek to new position
         *
         * @param pos the new position to seek to
         */
        void seek(long pos);
    
        /**
         * Get the current file length
         *
         * @return file length
         * @throws SmbException 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
    - 2.6K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/request-files.md

    * `write(data)`: Writes `data` (`str` or `bytes`) to the file.
    * `read(size)`: Reads `size` (`int`) bytes/characters of the file.
    * `seek(offset)`: Goes to the byte position `offset` (`int`) in the file.
        * E.g., `await myfile.seek(0)` would go to the start of the file.
        * This is especially useful if you run `await myfile.read()` once and then need to read the contents again.
    * `close()`: Closes the file.
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 7.3K bytes
    - Viewed (0)
  6. src/main/java/jcifs/internal/smb1/com/SmbComOpenAndXResponse.java

            super(config);
        }
    
        /**
         * Constructs an Open AndX response with a chained response.
         *
         * @param config the configuration
         * @param andxResp the chained seek response
         */
        public SmbComOpenAndXResponse(final Configuration config, final SmbComSeekResponse andxResp) {
            super(config, andxResp);
        }
    
        /**
         * Gets the file identifier.
         *
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 5.8K bytes
    - Viewed (0)
  7. src/test/java/jcifs/smb/SmbRandomAccessFileTest.java

            assertEquals(0, raf.skipBytes(-3));
        }
    
        @Test
        @DisplayName("seek() and getFilePointer(): set and get position")
        void seek_and_getFilePointer() throws Exception {
            SmbRandomAccessFile raf = newInstance("r", false, false, false);
            raf.seek(123L);
            assertEquals(123L, raf.getFilePointer());
        }
    
        @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)
  8. src/main/java/jcifs/smb1/smb1/SmbRandomAccessFile.java

        }
    
        /**
         * Sets the file pointer to the specified position.
         *
         * @param pos the new file pointer position
         * @throws SmbException if an I/O error occurs
         */
        public void seek(final long pos) throws SmbException {
            fp = pos;
        }
    
        /**
         * Returns the length of the file.
         *
         * @return the file length in bytes
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 14.1K bytes
    - Viewed (0)
  9. cmd/ftp-server-driver.go

    	if err != nil {
    		return 0, nil, err
    	}
    	defer func() {
    		if err != nil && obj != nil {
    			obj.Close()
    		}
    	}()
    
    	_, err = obj.Seek(offset, io.SeekStart)
    	if err != nil {
    		return 0, nil, err
    	}
    
    	info, err := obj.Stat()
    	if err != nil {
    		return 0, nil, err
    	}
    	n = info.Size - offset
    	return n, obj, nil
    }
    
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 14.3K bytes
    - Viewed (0)
  10. cmd/test-utils_test.go

    	req.Header.Set("x-amz-decoded-content-length", strconv.FormatInt(dataLength, 10))
    	req.Header.Set("content-length", strconv.FormatInt(contentLength, 10))
    
    	// Seek back to beginning.
    	body.Seek(0, 0)
    
    	// Add body
    	req.Body = io.NopCloser(body)
    	req.ContentLength = contentLength
    
    	return req, nil
    }
    
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 77K bytes
    - Viewed (0)
Back to top