Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for skipBytes (0.05 sec)

  1. internal/ioutil/ioutil.go

    type LimitWriter struct {
    	io.Writer
    	skipBytes int64
    	wLimit    int64
    }
    
    // Write implements the io.Writer interface limiting upto
    // configured length, also skips the first N bytes.
    func (w *LimitWriter) Write(p []byte) (n int, err error) {
    	n = len(p)
    	var n1 int
    	if w.skipBytes > 0 {
    		if w.skipBytes >= int64(len(p)) {
    			w.skipBytes -= int64(len(p))
    			return n, nil
    		}
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Tue Feb 18 16:25:55 UTC 2025
    - 11.1K bytes
    - Viewed (0)
  2. src/main/java/jcifs/pac/PacDataInputStream.java

         * @param n the number of bytes to skip
         * @return the actual number of bytes skipped
         * @throws IOException if an I/O error occurs
         */
        public int skipBytes(final int n) throws IOException {
            return this.dis.skipBytes(n);
        }
    
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 8.9K bytes
    - Viewed (0)
  3. src/main/java/jcifs/pac/PacLogonInfo.java

                final int domainIdPointer = pacStream.readInt();
    
                // Skip some reserved fields
                pacStream.skipBytes(8);
    
                this.userAccountControl = pacStream.readInt();
    
                // Skip some reserved fields
                pacStream.skipBytes(28);
    
                // Extra SIDs information
                final int extraSidCount = pacStream.readInt();
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 14.3K bytes
    - Viewed (0)
  4. src/test/java/jcifs/smb/SmbRandomAccessFileTest.java

            assertEquals(2, calls.get());
        }
    
        @Test
        @DisplayName("skipBytes(): advances file pointer for positive values")
        void skipBytes_advancesFP() throws Exception {
            SmbRandomAccessFile raf = newInstance("r", false, false, false);
            assertEquals(0L, raf.getFilePointer());
            int skipped = raf.skipBytes(5);
            assertEquals(5, skipped);
            assertEquals(5L, raf.getFilePointer());
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.1K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb1/netbios/SocketInputStreamTest.java

        }
    
        @ParameterizedTest
        @ValueSource(longs = { 0L, -1L, -10L })
        @DisplayName("Skip returns 0 for zero or negative values")
        void skipReturnsZeroForNegativeOrZero(long skipBytes) throws IOException {
            // Create message with 5 bytes of data
            byte[] data = new byte[] { 10, 20, 30, 40, 50 };
            InputStream in = new ByteArrayInputStream(concat(messageHeader(5), data));
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.2K bytes
    - Viewed (0)
  6. src/test/java/jcifs/smb1/smb1/SmbRandomAccessFileTest.java

            // Verify length was set (actual behavior depends on implementation)
        }
    
        @Test
        void testSkipBytes() throws SmbException {
            int skipAmount = 100;
            int result = smbRandomAccessFile.skipBytes(skipAmount);
    
            assertEquals(skipAmount, result);
            assertEquals(skipAmount, smbRandomAccessFile.getFilePointer());
        }
    
        @Test
        void testReadFully() throws SmbException {
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.3K bytes
    - Viewed (0)
  7. src/test/java/jcifs/pac/PacDataInputStreamTest.java

        @Test
        public void testSkipBytes() throws IOException {
            byte[] data = new byte[] { 0x01, 0x02, 0x03, 0x04 };
            PacDataInputStream pdis = createInputStream(data);
            int skipped = pdis.skipBytes(2);
            assertEquals(2, skipped);
            assertEquals(2, pdis.available());
            assertEquals(0x03, pdis.readByte());
        }
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 9.2K bytes
    - Viewed (0)
  8. src/main/java/jcifs/smb1/smb1/SmbRandomAccessFile.java

                    throw new SmbException("EOF");
                }
                n += count;
                fp += count;
            } while (n < len);
        }
    
        @Override
        public int skipBytes(final int n) throws SmbException {
            if (n > 0) {
                fp += n;
                return n;
            }
            return 0;
        }
    
        @Override
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 14.1K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/io/LittleEndianDataInputStream.java

        ByteStreams.readFully(this, b);
      }
    
      @Override
      public void readFully(byte[] b, int off, int len) throws IOException {
        ByteStreams.readFully(this, b, off, len);
      }
    
      @Override
      public int skipBytes(int n) throws IOException {
        return (int) in.skip(n);
      }
    
      @CanIgnoreReturnValue // to skip a byte
      @Override
      public int readUnsignedByte() throws IOException {
        int b1 = in.read();
        if (b1 < 0) {
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Wed Feb 12 03:49:18 UTC 2025
    - 7.3K bytes
    - Viewed (0)
  10. guava/src/com/google/common/io/ByteStreams.java

          try {
            input.readFully(b, off, len);
          } catch (IOException e) {
            throw new IllegalStateException(e);
          }
        }
    
        @Override
        public int skipBytes(int n) {
          try {
            return input.skipBytes(n);
          } catch (IOException e) {
            throw new IllegalStateException(e);
          }
        }
    
        @Override
        public boolean readBoolean() {
          try {
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Jul 17 15:26:41 UTC 2025
    - 31.1K bytes
    - Viewed (0)
Back to top