Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for Truncate (0.2 sec)

  1. android/guava/src/com/google/common/base/Ascii.java

       * the sequence will be returned as a string with no changes to the content.
       *
       * <p>Examples:
       *
       * <pre>{@code
       * Ascii.truncate("foobar", 7, "..."); // returns "foobar"
       * Ascii.truncate("foobar", 5, "..."); // returns "fo..."
       * }</pre>
       *
       * <p><b>Note:</b> This method <i>may</i> work with certain non-ASCII text but is not safe for use
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Jul 19 15:43:07 GMT 2021
    - 21.6K bytes
    - Viewed (0)
  2. guava/src/com/google/common/base/Ascii.java

       * the sequence will be returned as a string with no changes to the content.
       *
       * <p>Examples:
       *
       * <pre>{@code
       * Ascii.truncate("foobar", 7, "..."); // returns "foobar"
       * Ascii.truncate("foobar", 5, "..."); // returns "fo..."
       * }</pre>
       *
       * <p><b>Note:</b> This method <i>may</i> work with certain non-ASCII text but is not safe for use
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Jul 19 15:43:07 GMT 2021
    - 21.6K bytes
    - Viewed (0)
  3. src/test/java/jcifs/tests/ReadWriteTest.java

                try {
                    try ( OutputStream os = f.openOutputStream() ) {
                        writeRandom(4096, 3072, os);
                    }
    
                    // this should truncate
                    try ( OutputStream os = f.openOutputStream() ) {
                        writeRandom(4096, 1024, os);
                    }
    
                    try ( InputStream is = f.getInputStream() ) {
    Java
    - Registered: Sun May 05 00:10:10 GMT 2024
    - Last Modified: Sun Jul 01 13:12:10 GMT 2018
    - 13.2K bytes
    - Viewed (0)
  4. src/main/java/jcifs/smb/SmbFileOutputStream.java

                        this.fp = fh.getInitialSize();
                    }
                    init(th);
                    if ( !append && this.smb2 ) {
                        // no open option for truncating, need to truncate the file
                        Smb2SetInfoRequest treq = new Smb2SetInfoRequest(th.getConfig(), fh.getFileId());
                        treq.setFileInformation(new FileEndOfFileInformation(0));
    Java
    - Registered: Sun May 05 00:10:10 GMT 2024
    - Last Modified: Sat Nov 13 15:14:04 GMT 2021
    - 11.9K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/collect/StreamsTest.java

            .containsExactly("a:1", "b:2", "c:3")
            .inOrder();
      }
    
      public void testZipInfiniteWithInfinite() {
        // zip is doing an infinite zip, but we truncate the result so we can actually test it
        // but we want the zip itself to work
        assertThat(
                Streams.zip(
                        Stream.iterate(1, i -> i + 1).map(String::valueOf),
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 20K bytes
    - Viewed (0)
  6. src/main/java/jcifs/SmbResource.java

    
        /**
         * Opens an output stream writing to the file (write only, exclusive write access)
         * 
         * @param append
         *            whether to append to or truncate the input
         * @param openFlags
         *            flags for open operation
         * @param access
         *            desired file access flags
         * @param sharing
    Java
    - Registered: Sun May 05 00:10:10 GMT 2024
    - Last Modified: Sun Dec 20 14:09:34 GMT 2020
    - 26K bytes
    - Viewed (0)
  7. maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultUpdateCheckManager.java

                    } else {
                        props.remove(key + ERROR_KEY_SUFFIX);
                    }
    
                    getLogger().debug("Writing resolution-state to: " + touchfile);
                    channel.truncate(0);
                    props.store(Channels.newOutputStream(channel), "Last modified on: " + new Date());
    
                    lock.release();
                    lock = null;
    
                    channel.close();
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Wed Sep 06 11:28:54 GMT 2023
    - 12.1K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/io/CharSource.java

              break;
            }
          }
          return processor.getResult();
        }
    
        @Override
        public String toString() {
          return "CharSource.wrap(" + Ascii.truncate(seq, 30, "...") + ")";
        }
      }
    
      /**
       * Subclass specialized for string instances.
       *
       * <p>Since Strings are immutable and built into the jdk we can optimize some operations
       *
       * <ul>
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 22.4K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/io/ByteSource.java

          return new ByteArrayByteSource(bytes, newOffset, (int) length);
        }
    
        @Override
        public String toString() {
          return "ByteSource.wrap("
              + Ascii.truncate(BaseEncoding.base16().encode(bytes, offset, length), 30, "...")
              + ")";
        }
      }
    
      private static final class EmptyByteSource extends ByteArrayByteSource {
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 26.2K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/ImmutableMapTest.java

      public void testBuildKeepingLast_shortTable() {
        Builder<Integer, String> builder = ImmutableMap.builder();
        Map<Integer, String> expected = new LinkedHashMap<>();
        for (int i = 0; i < 1000; i++) {
          // Truncate to even key, so we have put(0, "0") then put(0, "1"). Half the entries are
          // duplicates.
          Integer key = i & ~1;
          String value = String.valueOf(i);
          builder.put(key, value);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Apr 30 14:39:16 GMT 2024
    - 37.3K bytes
    - Viewed (0)
Back to top