Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for Flush (0.13 sec)

  1. guava-tests/test/com/google/common/io/AppendableWriterTest.java

          return this;
        }
    
        @Override
        public Appendable append(CharSequence csq, int start, int end) {
          result.append(csq, start, end);
          return this;
        }
    
        @Override
        public void flush() {
          flushed = true;
        }
    
        @Override
        public void close() {
          closed = true;
        }
      }
    
      public void testWriteMethods() throws IOException {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/io/FileBackedOutputStream.java

        out.write(b, off, len);
      }
    
      @Override
      public synchronized void close() throws IOException {
        out.close();
      }
    
      @Override
      public synchronized void flush() throws IOException {
        out.flush();
      }
    
      /**
       * Checks if writing {@code len} bytes would go over threshold, and switches to file buffering if
       * so.
       */
      @GuardedBy("this")
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 8.2K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/io/FileBackedOutputStreamTest.java

          throws IOException {
        if (singleByte) {
          for (int i = off; i < off + len; i++) {
            out.write(b[i]);
          }
        } else {
          out.write(b, off, len);
        }
        out.flush(); // for coverage
      }
    
      // TODO(chrisn): only works if we ensure we have crossed file threshold
    
      public void testWriteErrorAfterClose() throws Exception {
        byte[] data = newPreFilledByteArray(100);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 5.5K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/io/BaseEncoding.java

                writtenChars++;
                bitBufferLength -= alphabet.bitsPerChar;
              }
            }
    
            @Override
            public void flush() throws IOException {
              out.flush();
            }
    
            @Override
            public void close() throws IOException {
              if (bitBufferLength > 0) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Mar 15 16:33:32 GMT 2024
    - 41.7K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/util/concurrent/InterruptibleTask.java

             * InterruptibleChannel and JavaLangAccess.blockedOn(Thread, Interruptible), it isn't
             * predictable what work might be done. (e.g., close a file and flush buffers to disk). To
             * protect ourselves from this, we park ourselves and tell our interrupter that we did so.
             */
            if (state == PARKED || compareAndSet(state, PARKED)) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Sep 29 21:34:48 GMT 2023
    - 9.9K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/io/ByteStreams.java

       */
      private static final int ZERO_COPY_CHUNK_SIZE = 512 * 1024;
    
      private ByteStreams() {}
    
      /**
       * Copies all bytes from the input stream to the output stream. Does not close or flush either
       * stream.
       *
       * <p><b>Java 9 users and later:</b> this method should be treated as deprecated; use the
       * equivalent {@link InputStream#transferTo} method instead.
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jan 17 18:59:58 GMT 2024
    - 29.7K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/collect/ImmutableMapTest.java

        Collection<Integer> values = map.values();
    
        ByteArrayOutputStream bytes = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(bytes);
        oos.writeObject(map);
        oos.flush();
    
        int mapSize = bytes.size();
        oos.writeObject(keySet);
        oos.writeObject(values);
        oos.close();
    
        int finalSize = bytes.size();
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Feb 27 13:27:08 GMT 2024
    - 41.3K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

      <T> T serialClone(T o) {
        try {
          ByteArrayOutputStream bos = new ByteArrayOutputStream();
          ObjectOutputStream oos = new ObjectOutputStream(bos);
          oos.writeObject(o);
          oos.flush();
          oos.close();
          ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray()));
          T clone = (T) ois.readObject();
          assertSame(o.getClass(), clone.getClass());
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 37.7K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/io/AppendableWriterTest.java

          return this;
        }
    
        @Override
        public Appendable append(CharSequence csq, int start, int end) {
          result.append(csq, start, end);
          return this;
        }
    
        @Override
        public void flush() {
          flushed = true;
        }
    
        @Override
        public void close() {
          closed = true;
        }
      }
    
      public void testWriteMethods() throws IOException {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

      <T> T serialClone(T o) {
        try {
          ByteArrayOutputStream bos = new ByteArrayOutputStream();
          ObjectOutputStream oos = new ObjectOutputStream(bos);
          oos.writeObject(o);
          oos.flush();
          oos.close();
          ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray()));
          T clone = (T) ois.readObject();
          assertSame(o.getClass(), clone.getClass());
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 37.2K bytes
    - Viewed (0)
Back to top