Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 261 for Data (0.14 sec)

  1. android/guava/src/com/google/common/collect/Serialization.java

       * for the data format. The size is determined by a prior call to {@link #readCount}.
       */
      static <K extends @Nullable Object, V extends @Nullable Object> void populateMap(
          Map<K, V> map, ObjectInputStream stream, int size)
          throws IOException, ClassNotFoundException {
        for (int i = 0; i < size; i++) {
          @SuppressWarnings("unchecked") // reading data stored by writeMap
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Mar 06 16:06:58 GMT 2023
    - 8.5K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/io/LittleEndianDataOutputStreamTest.java

        out.writeFloat(Float.intBitsToFloat(0xCAFEBABE));
        out.writeDouble(Double.longBitsToDouble(0xDEADBEEFCAFEBABEL));
    
        byte[] data = baos.toByteArray();
    
        /* Setup input streams */
        DataInput in = new DataInputStream(new ByteArrayInputStream(data));
    
        /* Read in various values NORMALLY */
        byte[] b = new byte[2];
        in.readFully(b);
        assertEquals(-100, b[0]);
        assertEquals(100, b[1]);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.7K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/AbstractChainedListenableFutureTest.java

     *
     * @author Nishant Thakkar
     */
    public abstract class AbstractChainedListenableFutureTest<T> extends TestCase {
      protected static final int EXCEPTION_DATA = -1;
      protected static final int VALID_INPUT_DATA = 1;
      protected static final Exception EXCEPTION = new Exception("Test exception");
    
      protected SettableFuture<Integer> inputFuture;
      protected ListenableFuture<T> resultFuture;
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.4K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/io/ByteSinkTester.java

        }
        return suite;
      }
    
      private ByteSink sink;
    
      ByteSinkTester(
          ByteSinkFactory factory, byte[] data, String suiteName, String caseDesc, Method method) {
        super(factory, data, suiteName, caseDesc, method);
      }
    
      @Override
      protected void setUp() throws Exception {
        sink = factory.createSink();
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 4K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/io/ByteStreamsTest.java

        assertEquals(Double.longBitsToDouble(0x1234567876543210L), in.readDouble(), 0.0);
      }
    
      public void testNewDataInput_readUTF() {
        byte[] data = new byte[17];
        data[1] = 15;
        System.arraycopy("Kilroy was here".getBytes(Charsets.UTF_8), 0, data, 2, 15);
        ByteArrayDataInput in = ByteStreams.newDataInput(data);
        assertEquals("Kilroy was here", in.readUTF());
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.9K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/AbstractIterator.java

     * interface easier to implement for certain types of data sources.
     *
     * <p>{@code Iterator} requires its implementations to support querying the end-of-data status
     * without changing the iterator's state, using the {@link #hasNext} method. But many data sources,
     * such as {@link java.io.Reader#read()}, do not expose this information; the only way to discover
     * whether there is any data left is by trying to retrieve it. These types of data sources are
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Fri Mar 18 02:04:10 GMT 2022
    - 6.4K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/hash/SipHashFunctionTest.java

        assertSip("abcdef", 0x2a6e77e733c7c05dL);
        assertSip("SipHash", 0x8325093242a96f60L);
      }
    
      // Test for common pitfall regarding sign extension.
      // For example: (long) data[i++] | (long) data[i++] << 8 | ...
      // If data[i] == (byte) 0x80, the first cast will sign-extend it to 0xffffffffffffff80,
      // masking the remaining seven bytes.
      // To test this, we give an input where bit 7 is not cleared. For example:
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Sun May 05 18:02:35 GMT 2019
    - 6.6K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/hash/BloomFilterStrategies.java

          this.bitCount = LongAddables.create();
        }
    
        // Used by serialization
        LockFreeBitArray(long[] data) {
          checkArgument(data.length > 0, "data length is zero!");
          this.data = new AtomicLongArray(data);
          this.bitCount = LongAddables.create();
          long bitCount = 0;
          for (long value : data) {
            bitCount += Long.bitCount(value);
          }
          this.bitCount.add(bitCount);
        }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 10.7K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/io/LittleEndianDataInputStreamTest.java

      }
    
      public void testReadFully() throws IOException {
        DataInput in = new LittleEndianDataInputStream(new ByteArrayInputStream(data));
        byte[] b = new byte[data.length];
        in.readFully(b);
        assertEquals(Bytes.asList(data), Bytes.asList(b));
      }
    
      public void testReadUnsignedByte_eof() throws IOException {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/io/LittleEndianDataInputStreamTest.java

      }
    
      public void testReadFully() throws IOException {
        DataInput in = new LittleEndianDataInputStream(new ByteArrayInputStream(data));
        byte[] b = new byte[data.length];
        in.readFully(b);
        assertEquals(Bytes.asList(data), Bytes.asList(b));
      }
    
      public void testReadUnsignedByte_eof() throws IOException {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.8K bytes
    - Viewed (0)
Back to top