Search Options

Results per page
Sort
Preferred Languages
Advance

Results 331 - 340 of 1,508 for byte1 (0.04 sec)

  1. src/test/java/org/codelibs/core/io/FileUtilTest.java

        File inputFile = URLUtil.toFile(url);
    
        /**
         * @throws Exception
         */
        @Test
        public void testFileToFile() throws Exception {
            final byte[] bytes = readBytes(inputFile);
            assertThat(bytes, is("あいうえお".getBytes("UTF-8")));
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testReadUTF8() throws Exception {
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  2. src/archive/tar/example_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package tar_test
    
    import (
    	"archive/tar"
    	"bytes"
    	"fmt"
    	"io"
    	"log"
    	"os"
    )
    
    func Example_minimal() {
    	// Create and add some files to the archive.
    	var buf bytes.Buffer
    	tw := tar.NewWriter(&buf)
    	var files = []struct {
    		Name, Body string
    	}{
    		{"readme.txt", "This archive contains some text files."},
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Thu Nov 16 16:54:08 UTC 2017
    - 1.4K bytes
    - Viewed (0)
  3. cmd/storage-rest-client.go

    }
    
    // AppendFile - append to a file.
    func (client *storageRESTClient) AppendFile(ctx context.Context, volume string, path string, buf []byte) error {
    	values := make(url.Values)
    	values.Set(storageRESTVolume, volume)
    	values.Set(storageRESTFilePath, path)
    	reader := bytes.NewReader(buf)
    	respBody, err := client.call(ctx, storageRESTMethodAppendFile, values, reader, -1)
    	defer xhttp.DrainBody(respBody)
    	return err
    }
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Oct 13 13:07:21 UTC 2024
    - 30.2K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/hash/MessageDigestHashFunctionTest.java

      }
    
      private static void assertMessageDigestHashing(byte[] input, String algorithmName) {
        try {
          MessageDigest digest = MessageDigest.getInstance(algorithmName);
          assertEquals(
              HashCode.fromBytes(digest.digest(input)), ALGORITHMS.get(algorithmName).hashBytes(input));
          for (int bytes = 4; bytes <= digest.getDigestLength(); bytes++) {
            assertEquals(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  5. docs/debugging/inspect/utils.go

    import (
    	"crypto/rsa"
    	"crypto/x509"
    	"encoding/base64"
    	"encoding/pem"
    	"log"
    )
    
    func bytesToPrivateKey(priv []byte) (*rsa.PrivateKey, error) {
    	// Try PEM
    	if block, _ := pem.Decode(priv); block != nil {
    		return x509.ParsePKCS1PrivateKey(block.Bytes)
    	}
    	// Try base 64
    	dst := make([]byte, base64.StdEncoding.DecodedLen(len(priv)))
    	if n, err := base64.StdEncoding.Decode(dst, priv); err == nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Nov 02 20:36:38 UTC 2022
    - 1.4K bytes
    - Viewed (0)
  6. cmd/perf-tests.go

    	}, nil
    }
    
    // To collect RX stats during "mc support perf net"
    // RXSample holds the RX bytes for the duration between
    // the last peer to connect and the first peer to disconnect.
    // This is to improve the RX throughput accuracy.
    type netPerfRX struct {
    	RX                uint64    // RX bytes
    	lastToConnect     time.Time // time at which last peer to connect to us
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/io/BaseEncodingTest.java

          throws IOException {
        byte[] bytes = decoded.getBytes(UTF_8);
        try (InputStream decodingStream = encoding.decodingStream(new StringReader(encoded))) {
          for (int i = 0; i < bytes.length; i++) {
            assertThat(decodingStream.read()).isEqualTo(bytes[i] & 0xFF);
          }
          assertThat(decodingStream.read()).isEqualTo(-1);
        }
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 16:27:30 UTC 2024
    - 24.6K bytes
    - Viewed (0)
  8. src/main/java/org/codelibs/curl/CurlRequest.java

                    final byte[] bytes = new byte[4096];
                    int length = bis.read(bytes);
                    while (length != -1) {
                        if (length != 0) {
                            final int len = length;
                            logger.fine(() -> {
                                try {
                                    return "<<< " + new String(bytes, 0, len, encoding);
    Registered: Thu Oct 31 02:32:13 UTC 2024
    - Last Modified: Sun Feb 12 12:21:25 UTC 2023
    - 12.3K bytes
    - Viewed (0)
  9. src/main/java/jcifs/internal/smb2/Smb3KeyDerivation.java

            gen.init(param);
    
            byte[] derived = new byte[16];
            gen.generateBytes(derived, 0, 16);
            return derived;
        }
    
    
        /**
         * @param string
         * @return null terminated ASCII bytes
         */
        private static byte[] toCBytes ( String string ) {
            byte[] data = new byte[string.length() + 1];
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Sun Jul 01 13:12:10 UTC 2018
    - 5.7K bytes
    - Viewed (0)
  10. cmd/admin-handlers-config-kv.go

    	}
    
    	writeSuccessResponseHeadersOnly(w)
    }
    
    func setConfigKV(ctx context.Context, objectAPI ObjectLayer, kvBytes []byte) (result setConfigResult, err error) {
    	result.Cfg, err = readServerConfig(ctx, objectAPI, nil)
    	if err != nil {
    		return
    	}
    
    	result.Dynamic, err = result.Cfg.ReadConfig(bytes.NewReader(kvBytes))
    	if err != nil {
    		return
    	}
    
    	result.SubSys, _, _, err = config.GetSubSys(string(kvBytes))
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 15.7K bytes
    - Viewed (0)
Back to top