Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,555 for readN (0.03 sec)

  1. src/main/java/jcifs/smb1/smb1/SmbTransport.java

            do {
                if ((n = readn( in, sbuf, 0, 4 )) < 4)
                    return null;
            } while (sbuf[0] == (byte)0x85);  /* Dodge NetBIOS keep-alive */
                                                       /* read smb header */
            if ((n = readn( in, sbuf, 4, 32 )) < 32)
                return null;
            if (log.level >= 4) {
                log.println( "New data read: " + this );
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Fri Mar 22 21:10:40 UTC 2019
    - 31.2K bytes
    - Viewed (0)
  2. cmd/metacache-stream_test.go

    	}
    
    	want = want[:0]
    	entries, err = r.readN(0, false, true, false, "")
    	if err != nil {
    		t.Fatal(err, entries.len())
    	}
    	if entries.len() != len(want) {
    		t.Fatal("unexpected length:", entries.len(), "want:", len(want))
    	}
    
    	// Reload.
    	r = loadMetacacheSample(t)
    	defer r.Close()
    	entries, err = r.readN(0, false, true, false, "")
    	if err != nil {
    		t.Fatal(err, entries.len())
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 19 18:05:16 UTC 2022
    - 15K bytes
    - Viewed (0)
  3. src/main/java/jcifs/netbios/SessionServicePacket.java

            return ( ( src[ srcIndex++ ] & 0x01 ) << 16 ) + ( ( src[ srcIndex++ ] & 0xFF ) << 8 ) + ( src[ srcIndex++ ] & 0xFF );
        }
    
    
        static int readn ( InputStream in, byte[] b, int off, int len ) throws IOException {
            int i = 0, n;
    
            while ( i < len ) {
                n = in.read(b, off + i, len - i);
                if ( n <= 0 ) {
                    break;
                }
                i += n;
            }
    
            return i;
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Sun Jul 01 13:12:10 UTC 2018
    - 4.6K bytes
    - Viewed (0)
  4. internal/etag/reader.go

    		if er.readN == 0 && Equal(etag, er.checksum) {
    			return er
    		}
    	}
    	if len(forceMD5) != 0 {
    		return &Reader{
    			src:      r,
    			md5:      NewUUIDHash(forceMD5),
    			checksum: etag,
    		}
    	}
    	return &Reader{
    		src:      r,
    		md5:      md5.New(),
    		checksum: etag,
    	}
    }
    
    // Read reads up to len(p) bytes from the underlying
    // io.Reader as specified by the io.Reader interface.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Jan 18 07:03:17 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  5. src/main/java/jcifs/smb1/netbios/SessionServicePacket.java

                    (( src[srcIndex++] & 0xFF ) << 8 ) +
                    ( src[srcIndex++] & 0xFF );
        }
        static int readn( InputStream in,
                    byte[] b,
                    int off,
                    int len ) throws IOException {
            int i = 0, n;
    
            while (i < len) {
                n = in.read( b, off + i, len - i );
                if (n <= 0) {
                    break;
                }
                i += n;
            }
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Fri Mar 22 20:39:42 UTC 2019
    - 4.8K bytes
    - Viewed (0)
  6. src/main/java/jcifs/smb/SmbTransportImpl.java

        @Override
        protected Long peekKey () throws IOException {
            do {
                if ( ( readn(this.in, this.sbuf, 0, 4) ) < 4 ) {
                    return null;
                }
            }
            while ( this.sbuf[ 0 ] == (byte) 0x85 ); /* Dodge NetBIOS keep-alive */
            /* read smb header */
            if ( ( readn(this.in, this.sbuf, 4, SmbConstants.SMB1_HEADER_LENGTH) ) < SmbConstants.SMB1_HEADER_LENGTH ) {
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Wed Jan 18 23:47:00 UTC 2023
    - 67K bytes
    - Viewed (0)
  7. src/main/java/jcifs/smb1/util/transport/Transport.java

        static int id = 0;
        static LogStream log = LogStream.getInstance();
    
        public static int readn( InputStream in,
                    byte[] b,
                    int off,
                    int len ) throws IOException {
            int i = 0, n = -5;
    
            while (i < len) {
                n = in.read( b, off + i, len - i );
                if (n <= 0) {
                    break;
                }
                i += n;
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Fri Mar 22 20:39:42 UTC 2019
    - 9K bytes
    - Viewed (0)
  8. cmd/metacache-stream.go

    			}
    			r.err = err
    			return err
    		}
    	}
    }
    
    // readN will return all the requested number of entries in order
    // or all if n < 0.
    // Will return io.EOF if end of stream is reached.
    // If requesting 0 objects nil error will always be returned regardless of at end of stream.
    // Use peek to determine if at end of stream.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Apr 04 12:04:40 UTC 2024
    - 19.5K bytes
    - Viewed (0)
  9. src/main/java/jcifs/util/transport/Transport.java

        private static final Logger log = LoggerFactory.getLogger(Transport.class);
    
    
        /**
         * Read bytes from the input stream into a buffer
         * 
         * @param in
         * @param b
         * @param off
         * @param len
         * @return number of bytes read
         * @throws IOException
         */
        public static int readn ( InputStream in, byte[] b, int off, int len ) throws IOException {
            int i = 0, n = -5;
    
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Sun Nov 01 18:12:21 UTC 2020
    - 24.1K bytes
    - Viewed (0)
  10. cmd/metacache-set.go

    		})
    		if (err != nil && errors.Is(err, io.EOF)) || pastPrefix || r.nextEOF() {
    			return entries, io.EOF
    		}
    		return entries, err
    	}
    
    	// We should not need to filter more.
    	return r.readN(o.Limit, o.InclDeleted, o.IncludeDirectories, o.Versioned, o.Prefix)
    }
    
    func (er *erasureObjects) streamMetadataParts(ctx context.Context, o listPathOptions) (entries metaCacheEntriesSorted, err error) {
    	retries := 0
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jul 12 16:23:16 UTC 2024
    - 30.7K bytes
    - Viewed (0)
Back to top