Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 61 - 70 of 86 for newDecoder (0.05 seconds)

  1. impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnup/ConsoleIcon.java

         * @return the Unicode character if supported, otherwise the ASCII fallback
         */
        public String getIcon(Terminal terminal) {
            Charset charset = getTerminalCharset(terminal);
            return charset.newEncoder().canEncode(unicodeChar) ? String.valueOf(unicodeChar) : asciiFallback;
        }
    
        /**
         * Gets the charset used by the terminal for output.
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Tue Jul 15 09:35:08 GMT 2025
    - 3.1K bytes
    - Click Count (0)
  2. cmd/callhome.go

    	var b bytes.Buffer
    	gzWriter := gzip.NewWriter(&b)
    
    	header := struct {
    		Version string `json:"version"`
    	}{Version: healthInfo.Version}
    
    	enc := json.NewEncoder(gzWriter)
    	if e := enc.Encode(header); e != nil {
    		internalLogIf(ctx, fmt.Errorf("Could not encode health info header: %w", e))
    		return nil
    	}
    
    	if e := enc.Encode(healthInfo); e != nil {
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Fri Aug 29 02:39:48 GMT 2025
    - 5.3K bytes
    - Click Count (0)
  3. cmd/generic-handlers_test.go

    	var okHandler http.HandlerFunc = func(w http.ResponseWriter, r *http.Request) {
    		w.WriteHeader(http.StatusOK)
    	}
    	for i, test := range sseTLSHandlerTests {
    		globalIsTLS = test.IsTLS
    
    		w := httptest.NewRecorder()
    		r := new(http.Request)
    		r.Header = test.Header
    		r.URL = test.URL
    
    		h := setRequestValidityMiddleware(okHandler)
    		h.ServeHTTP(w, r)
    
    		switch {
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Fri Aug 29 02:39:48 GMT 2025
    - 6.2K bytes
    - Click Count (0)
  4. cmd/object-lambda-handlers_test.go

    			sum := sha256.Sum256(body)
    			req.Header.Set("X-Amz-Content-Sha256", hex.EncodeToString(sum[:]))
    			req = signer.SignV4(*req, credentials.AccessKey, credentials.SecretKey, "", "us-east-1")
    
    			rec := httptest.NewRecorder()
    			api := objectAPIHandlers{
    				ObjectAPI: func() ObjectLayer {
    					return obj
    				},
    			}
    			api.GetObjectLambdaHandler(rec, req)
    
    			res := rec.Result()
    			defer res.Body.Close()
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Fri Jul 18 21:56:31 GMT 2025
    - 5.2K bytes
    - Click Count (0)
  5. internal/s3select/csv/record.go

    	var kvs jstream.KVS = make([]jstream.KV, 0, len(r.columnNames))
    	for i, cn := range r.columnNames {
    		if i < len(r.csvRecord) {
    			kvs = append(kvs, jstream.KV{Key: cn, Value: r.csvRecord[i]})
    		}
    	}
    	return json.NewEncoder(writer).Encode(kvs)
    }
    
    // Raw - returns the underlying data with format info.
    func (r *Record) Raw() (sql.SelectObjectFormat, any) {
    	return sql.SelectFmtCSV, r
    }
    
    // Replace - is not supported for CSV
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Fri Aug 29 02:39:48 GMT 2025
    - 4.1K bytes
    - Click Count (0)
  6. internal/pubsub/pubsub.go

    				}
    			}
    			atomic.StoreUint64(&ps.types, uint64(remainTypes))
    			atomic.AddInt32(&ps.numSubscribers, -1)
    		}()
    
    		// Read from subChT and write to subCh
    		var buf bytes.Buffer
    		enc := json.NewEncoder(&buf)
    		for {
    			select {
    			case <-doneCh:
    				return
    			case v, ok := <-subChT:
    				if !ok {
    					return
    				}
    				buf.Reset()
    				err := enc.Encode(v)
    				if err != nil {
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Tue Feb 06 16:57:30 GMT 2024
    - 5.2K bytes
    - Click Count (0)
  7. impl/maven-cli/src/test/java/org/apache/maven/cling/invoker/mvnup/ConsoleIconTest.java

                assertNotNull(result, "Icon result should not be null for " + icon);
    
                // Result should be consistent with charset's canEncode capability
                boolean canEncode = StandardCharsets.ISO_8859_1.newEncoder().canEncode(icon.getUnicodeChar());
                String expected = canEncode ? String.valueOf(icon.getUnicodeChar()) : icon.getAsciiFallback();
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Tue Jul 15 09:35:08 GMT 2025
    - 6.8K bytes
    - Click Count (0)
  8. internal/s3select/json/record.go

    func (r *Record) Raw() (sql.SelectObjectFormat, any) {
    	return r.SelectFormat, r.KVS
    }
    
    // WriteJSON - encodes to JSON data.
    func (r *Record) WriteJSON(writer io.Writer) error {
    	return json.NewEncoder(writer).Encode(r.KVS)
    }
    
    // Replace the underlying buffer of json data.
    func (r *Record) Replace(k any) error {
    	v, ok := k.(jstream.KVS)
    	if !ok {
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Fri Aug 29 02:39:48 GMT 2025
    - 5.2K bytes
    - Click Count (0)
  9. internal/hash/checksum_test.go

    			if chksm.Type.FullObjectRequested() {
    				m[xhttp.AmzChecksumType] = xhttp.AmzChecksumTypeFullObject
    			} else {
    				m[xhttp.AmzChecksumType] = xhttp.AmzChecksumTypeComposite
    			}
    
    			w := httptest.NewRecorder()
    			AddChecksumHeader(w, m)
    			gotChksm, err := GetContentChecksum(w.Result().Header)
    			if tt.wantErr {
    				if err == nil {
    					t.Fatalf("Expected error for %s, got none", tt.name)
    				}
    				return
    			}
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Fri Aug 22 14:15:21 GMT 2025
    - 7.1K bytes
    - Click Count (0)
  10. internal/logger/logrotate.go

    func (w *Writer) Close() error {
    	w.pw.CloseWithError(nil)
    
    	if w.f != nil {
    		if err := w.closeCurrentFile(); err != nil {
    			return err
    		}
    	}
    
    	return nil
    }
    
    var stdErrEnc = json.NewEncoder(os.Stderr)
    
    func (w *Writer) listen() {
    	for {
    		var r io.Reader = w.pr
    		if w.opts.MaximumFileSize > 0 {
    			r = io.LimitReader(w.pr, w.opts.MaximumFileSize)
    		}
    		if _, err := io.Copy(w.f, r); err != nil {
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Sun Mar 30 00:56:02 GMT 2025
    - 5.8K bytes
    - Click Count (0)
Back to Top