Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for UnicodeEscaper (0.27 sec)

  1. android/guava/src/com/google/common/escape/UnicodeEscaper.java

     * characters.
     *
     * <p>As there are important reasons, including potential security issues, to handle Unicode
     * correctly if you are considering implementing a new escaper you should favor using UnicodeEscaper
     * wherever possible.
     *
     * <p>A {@code UnicodeEscaper} instance is required to be stateless, and safe when used concurrently
     * by multiple threads.
     *
     * <p>Popular escapers are defined as constants in classes like {@link
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 18 20:55:09 GMT 2022
    - 13.2K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/escape/Escapers.java

       * @return a UnicodeEscaper with the same behavior as the given instance
       * @throws NullPointerException if escaper is null
       * @throws IllegalArgumentException if escaper is not a UnicodeEscaper or a CharEscaper
       */
      static UnicodeEscaper asUnicodeEscaper(Escaper escaper) {
        checkNotNull(escaper);
        if (escaper instanceof UnicodeEscaper) {
          return (UnicodeEscaper) escaper;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 26 20:07:17 GMT 2023
    - 10.5K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/escape/UnicodeEscaperTest.java

      // Escapes nothing
      private static final UnicodeEscaper NOP_ESCAPER =
          new UnicodeEscaper() {
            @Override
            protected char @Nullable [] escape(int c) {
              return null;
            }
          };
    
      // Escapes everything except [a-zA-Z0-9]
      private static final UnicodeEscaper SIMPLE_ESCAPER =
          new UnicodeEscaper() {
            @Override
            protected char @Nullable [] escape(int cp) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 6.2K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/escape/ArrayBasedUnicodeEscaperTest.java

      public void testReplacements() throws IOException {
        // In reality this is not a very sensible escaper to have (if you are only
        // escaping elements from a map you would use a ArrayBasedCharEscaper).
        UnicodeEscaper escaper =
            new ArrayBasedUnicodeEscaper(
                SIMPLE_REPLACEMENTS, Character.MIN_VALUE, Character.MAX_CODE_POINT, null) {
              @Override
              protected char[] escapeUnsafe(int c) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Feb 07 23:02:38 GMT 2024
    - 5K bytes
    - Viewed (1)
  5. android/guava-testlib/src/com/google/common/escape/testing/EscaperAsserts.java

    import com.google.common.annotations.GwtCompatible;
    import com.google.common.escape.CharEscaper;
    import com.google.common.escape.Escaper;
    import com.google.common.escape.UnicodeEscaper;
    import java.io.IOException;
    import junit.framework.Assert;
    
    /**
     * Extra assert methods for testing Escaper implementations.
     *
     * @author David Beaumont
     * @since 15.0
     */
    @GwtCompatible
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 18 20:55:09 GMT 2022
    - 3.8K bytes
    - Viewed (0)
  6. guava-testlib/src/com/google/common/escape/testing/EscaperAsserts.java

    import com.google.common.annotations.GwtCompatible;
    import com.google.common.escape.CharEscaper;
    import com.google.common.escape.Escaper;
    import com.google.common.escape.UnicodeEscaper;
    import java.io.IOException;
    import junit.framework.Assert;
    
    /**
     * Extra assert methods for testing Escaper implementations.
     *
     * @author David Beaumont
     * @since 15.0
     */
    @GwtCompatible
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Jan 18 20:55:09 GMT 2022
    - 3.8K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/net/UrlEscapersTest.java

      // Helper to assert common expected behaviour of uri escapers.
      static void assertBasicUrlEscaper(UnicodeEscaper e) {
        assertBasicUrlEscaperExceptPercent(e);
        // The escape character must always be escaped
        assertEscaping(e, "%25", '%');
      }
    
      public void testUrlFormParameterEscaper() {
        UnicodeEscaper e = (UnicodeEscaper) urlFormParameterEscaper();
        // Verify that these are the same escaper (as documented)
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue May 15 20:25:06 GMT 2018
    - 4.9K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/escape/UnicodeEscaperTest.java

      // Escapes nothing
      private static final UnicodeEscaper NOP_ESCAPER =
          new UnicodeEscaper() {
            @Override
            protected char @Nullable [] escape(int c) {
              return null;
            }
          };
    
      // Escapes everything except [a-zA-Z0-9]
      private static final UnicodeEscaper SIMPLE_ESCAPER =
          new UnicodeEscaper() {
            @Override
            protected char @Nullable [] escape(int cp) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 6.2K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/escape/EscapersTest.java

                    .put('\uDC00', "<lo>".toCharArray())
                    .buildOrThrow());
        UnicodeEscaper unicodeEscaper = Escapers.asUnicodeEscaper(charEscaper);
        EscaperAsserts.assertBasic(unicodeEscaper);
        assertEquals("<hello><hi><lo>", charEscaper.escape("x\uD800\uDC00"));
        assertEquals("<hello><hi><lo>", unicodeEscaper.escape("x\uD800\uDC00"));
    
        // Test that wrapped escapers acquire good Unicode semantics.
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 5K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/net/UrlEscapersTest.java

      // Helper to assert common expected behaviour of uri escapers.
      static void assertBasicUrlEscaper(UnicodeEscaper e) {
        assertBasicUrlEscaperExceptPercent(e);
        // The escape character must always be escaped
        assertEscaping(e, "%25", '%');
      }
    
      public void testUrlFormParameterEscaper() {
        UnicodeEscaper e = (UnicodeEscaper) urlFormParameterEscaper();
        // Verify that these are the same escaper (as documented)
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.9K bytes
    - Viewed (0)
Back to top