Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,355 for Withrow (0.2 sec)

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

        TestCloseable c2 = closer.register(TestCloseable.normal());
    
        IOException exception = new IOException();
    
        try {
          try {
            throw exception;
          } catch (Throwable e) {
            throw closer.rethrow(e);
          } finally {
            closer.close();
          }
        } catch (Throwable expected) {
          assertSame(exception, expected);
        }
    
        assertTrue(c1.isClosed());
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Mar 06 15:15:46 GMT 2024
    - 13.6K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/io/CloserTest.java

        TestCloseable c2 = closer.register(TestCloseable.normal());
    
        IOException exception = new IOException();
    
        try {
          try {
            throw exception;
          } catch (Throwable e) {
            throw closer.rethrow(e);
          } finally {
            closer.close();
          }
        } catch (Throwable expected) {
          assertSame(exception, expected);
        }
    
        assertTrue(c1.isClosed());
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Mar 06 15:15:46 GMT 2024
    - 13.6K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/io/CharSink.java

        try {
          Writer out = closer.register(openStream());
          out.append(charSequence);
          out.flush(); // https://code.google.com/p/guava-libraries/issues/detail?id=1330
        } catch (Throwable e) {
          throw closer.rethrow(e);
        } finally {
          closer.close();
        }
      }
    
      /**
       * Writes the given lines of text to this sink with each line (including the last) terminated with
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 6.1K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/io/Closer.java

     *   // do stuff
     * } catch (Throwable e) {
     *   // ensure that any checked exception types other than IOException that could be thrown are
     *   // provided here, e.g. throw closer.rethrow(e, CheckedException.class);
     *   throw closer.rethrow(e);
     * } finally {
     *   closer.close();
     * }
     * }</pre>
     *
     * <p>Note that this try-catch-finally block is not equivalent to a try-catch-finally block using
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Mar 06 15:15:46 GMT 2024
    - 11.9K bytes
    - Viewed (0)
  5. guava-testlib/test/com/google/common/testing/NullPointerTesterTest.java

      public static class TwoArg {
        /** Action to take on a null param. */
        public enum Action {
          THROW_A_NPE {
            @Override
            public void act() {
              throw new NullPointerException();
            }
          },
          THROW_OTHER {
            @Override
            public void act() {
              throw new FooException();
            }
          },
          JUST_RETURN {
            @Override
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Nov 16 15:12:31 GMT 2023
    - 47.9K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/io/CharSource.java

        }
    
        Closer closer = Closer.create();
        try {
          Reader reader = closer.register(openStream());
          return countBySkipping(reader);
        } catch (Throwable e) {
          throw closer.rethrow(e);
        } finally {
          closer.close();
        }
      }
    
      private long countBySkipping(Reader reader) throws IOException {
        long count = 0;
        long read;
    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)
  7. android/guava/src/com/google/common/io/ByteSource.java

        }
        Closer closer = Closer.create();
        try {
          InputStream in = closer.register(openStream());
          return in.read() == -1;
        } catch (Throwable e) {
          throw closer.rethrow(e);
        } finally {
          closer.close();
        }
      }
    
      /**
       * Returns the size of this source in bytes, if the size can be easily determined without actually
       * opening the data stream.
    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)
  8. android/guava/src/com/google/common/io/ByteSink.java

        try {
          OutputStream out = closer.register(openStream());
          out.write(bytes);
          out.flush(); // https://code.google.com/p/guava-libraries/issues/detail?id=1330
        } catch (Throwable e) {
          throw closer.rethrow(e);
        } finally {
          closer.close();
        }
      }
    
      /**
       * Writes all the bytes from the given {@code InputStream} to this sink. Does not close {@code
       * input}.
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 5.5K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/io/Closeables.java

       *   try {
       *     // ... code which does something with the stream ...
       *     threw = false;
       *   } finally {
       *     // If an exception occurs, rethrow it only if threw==false:
       *     Closeables.close(stream, threw);
       *   }
       * }
       * }</pre>
       *
       * @param closeable the {@code Closeable} object to be closed, or null, in which case this method
       *     does nothing
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 4.7K bytes
    - Viewed (0)
  10. maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleModuleBuilder.java

                        new ProjectExecutionEvent(session, currentProject, t));
    
                // rethrow original errors and runtime exceptions
                if (t instanceof RuntimeException) {
                    throw (RuntimeException) t;
                }
                if (t instanceof Error) {
                    throw (Error) t;
                }
            } finally {
                session.setCurrentProject(null);
    
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Wed Feb 28 23:31:09 GMT 2024
    - 5.4K bytes
    - Viewed (0)
Back to top