Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,508 for encodeTo (0.13 sec)

  1. platforms/core-runtime/serialization/src/test/groovy/org/gradle/internal/serialize/AbstractCodecTest.groovy

            when:
            encodeTo(outputStream) { Encoder encoder ->
                encoder.outputStream.flush()
                encoder.outputStream.close()
            }
    
            then:
            0 * outputStream.close()
            0 * outputStream.flush()
        }
    
        def "can encode and decode raw bytes"() {
            expect:
            def bytes = encode { Encoder encoder ->
                encoder.writeByte(Byte.MIN_VALUE)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Apr 15 16:06:56 UTC 2024
    - 14.9K bytes
    - Viewed (0)
  2. platforms/core-runtime/serialization/src/test/groovy/org/gradle/internal/serialize/StreamBackedCodecTest.groovy

     */
    
    package org.gradle.internal.serialize
    
    class StreamBackedCodecTest extends AbstractCodecTest {
        @Override
        void encodeTo(OutputStream outputStream, Closure<Encoder> closure) {
            def encoder = new OutputStreamBackedEncoder(outputStream)
            closure.call(encoder)
        }
    
        @Override
        void decodeFrom(InputStream inputStream, Closure<Decoder> closure) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Apr 15 16:06:56 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/io/BaseEncoding.java

          super(message);
        }
      }
    
      /** Encodes the specified byte array, and returns the encoded {@code String}. */
      public String encode(byte[] bytes) {
        return encode(bytes, 0, bytes.length);
      }
    
      /**
       * Encodes the specified range of the specified byte array, and returns the encoded {@code
       * String}.
       */
      public final String encode(byte[] bytes, int off, int len) {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri Mar 15 16:33:32 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  4. guava/src/com/google/common/io/BaseEncoding.java

          super(message);
        }
      }
    
      /** Encodes the specified byte array, and returns the encoded {@code String}. */
      public String encode(byte[] bytes) {
        return encode(bytes, 0, bytes.length);
      }
    
      /**
       * Encodes the specified range of the specified byte array, and returns the encoded {@code
       * String}.
       */
      public final String encode(byte[] bytes, int off, int len) {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri Mar 15 16:33:32 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  5. platforms/core-runtime/serialization/src/test/groovy/org/gradle/internal/serialize/kryo/KryoBackedCodecTest.groovy

            }
        }
    
        def "can encode and decode multiple byte streams"() {
            when:
            def bytes = encode { Encoder encoder ->
                encoder.encodeChunked { Encoder nested ->
                    nested.writeSmallInt(1)
                    nested.writeString("chunked")
                }
                encoder.encodeChunked { Encoder nested ->
                }
                encoder.encodeChunked { Encoder nested ->
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Apr 15 16:06:56 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  6. fastapi/encoders.py

        if isinstance(obj, BaseModel):
            # TODO: remove when deprecating Pydantic v1
            encoders: Dict[Any, Any] = {}
            if not PYDANTIC_V2:
                encoders = getattr(obj.__config__, "json_encoders", {})  # type: ignore[attr-defined]
                if custom_encoder:
                    encoders.update(custom_encoder)
            obj_dict = _model_dump(
                obj,
                mode="json",
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 21:56:59 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  7. platforms/core-runtime/serialization/src/main/java/org/gradle/internal/serialize/Encoder.java

        /**
         * Writes the given byte array to the stream. Encodes the bytes and length information.
         */
        void writeBinary(byte[] bytes, int offset, int count) throws IOException;
    
        /**
         * Appends an encoded stream to this stream. Encodes the stream as a series of chunks with length information.
         */
        void encodeChunked(EncodeAction<Encoder> writeAction) throws Exception;
    
        /**
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Apr 15 16:06:56 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  8. src/internal/pkgbits/encoder.go

    func (w *Encoder) Uint64(x uint64) {
    	w.Sync(SyncUint64)
    	w.rawUvarint(x)
    }
    
    // Len encodes and writes a non-negative int value into the element bitstream.
    func (w *Encoder) Len(x int) { assert(x >= 0); w.Uint64(uint64(x)) }
    
    // Int encodes and writes an int value into the element bitstream.
    func (w *Encoder) Int(x int) { w.Int64(int64(x)) }
    
    // Len encodes and writes a uint value into the element bitstream.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 10 23:26:58 UTC 2022
    - 9.6K bytes
    - Viewed (0)
  9. src/encoding/json/encode.go

    // by calling [Encoder.SetEscapeHTML](false).
    //
    // Array and slice values encode as JSON arrays, except that
    // []byte encodes as a base64-encoded string, and a nil slice
    // encodes as the null JSON value.
    //
    // Struct values encode as JSON objects.
    // Each exported struct field becomes a member of the object, using the
    // field name as the object key, unless the field is omitted for one of the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 36.2K bytes
    - Viewed (0)
  10. src/encoding/gob/encoder.go

    	enc := new(Encoder)
    	enc.w = []io.Writer{w}
    	enc.sent = make(map[reflect.Type]typeId)
    	enc.countState = enc.newEncoderState(new(encBuffer))
    	return enc
    }
    
    // writer returns the innermost writer the encoder is using.
    func (enc *Encoder) writer() io.Writer {
    	return enc.w[len(enc.w)-1]
    }
    
    // pushWriter adds a writer to the encoder.
    func (enc *Encoder) pushWriter(w io.Writer) {
    	enc.w = append(enc.w, w)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:04:28 UTC 2023
    - 7.8K bytes
    - Viewed (0)
Back to top