Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for _seek (0.01 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. cmd/dummy-data-generator_test.go

    		d.idx += int64(w)
    		n += w
    	}
    	if d.idx >= d.length {
    		extraBytes := d.idx - d.length
    		n -= int(extraBytes)
    		if n < 0 {
    			n = 0
    		}
    		err = io.EOF
    	}
    	return
    }
    
    func (d *DummyDataGen) Seek(offset int64, whence int) (int64, error) {
    	switch whence {
    	case io.SeekStart:
    		if offset < 0 {
    			return 0, errors.New("Invalid offset")
    		}
    		d.idx = offset
    	case io.SeekCurrent:
    		if d.idx+offset < 0 {
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Sun Mar 30 00:56:02 UTC 2025
    - 4.7K bytes
    - Viewed (0)
  7. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/ws/WebSocketWriter.kt

          sinkBuffer.write(maskKey)
    
          if (length > 0) {
            val payloadStart = sinkBuffer.size
            sinkBuffer.write(payload)
    
            sinkBuffer.readAndWriteUnsafe(maskCursor!!)
            maskCursor.seek(payloadStart)
            toggleMask(maskCursor, maskKey)
            maskCursor.close()
          }
        } else {
          sinkBuffer.writeByte(b1)
          sinkBuffer.write(payload)
        }
    
        sink.flush()
      }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 6K bytes
    - Viewed (0)
  8. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/ws/WebSocketReader.kt

        if (frameLength > 0L) {
          source.readFully(controlFrameBuffer, frameLength)
    
          if (!isClient) {
            controlFrameBuffer.readAndWriteUnsafe(maskCursor!!)
            maskCursor.seek(0)
            toggleMask(maskCursor, maskKey!!)
            maskCursor.close()
          }
        }
    
        when (opcode) {
          OPCODE_CONTROL_PING -> {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue Jul 29 22:04:11 UTC 2025
    - 9.9K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top