Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 2,157 for Try (0.15 sec)

  1. src/test/java/jcifs/tests/ReadWriteTest.java

        }
    
    
        @Test
        public void testTrucation () throws IOException {
            try ( SmbFile f = createTestFile() ) {
                try {
                    try ( OutputStream os = f.openOutputStream() ) {
                        writeRandom(4096, 3072, os);
                    }
    
                    // this should truncate
                    try ( OutputStream os = f.openOutputStream() ) {
                        writeRandom(4096, 1024, os);
    Java
    - Registered: Sun Apr 21 00:10:10 GMT 2024
    - Last Modified: Sun Jul 01 13:12:10 GMT 2018
    - 13.2K bytes
    - Viewed (0)
  2. src/test/java/jcifs/tests/RandomAccessFileTest.java

            try ( SmbFile f = createTestFile() ) {
                try {
                    try ( SmbFileOutputStream os = f.openOutputStream() ) {
                        os.write(new byte[] {
                            0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7
                        });
                    }
    
                    byte[] buf = new byte[4];
    Java
    - Registered: Sun Apr 21 00:10:10 GMT 2024
    - Last Modified: Sun Jul 01 13:12:10 GMT 2018
    - 11.4K bytes
    - Viewed (0)
  3. src/test/java/jcifs/tests/ConcurrencyTest.java

            public MutiThreadTestCase () {}
    
    
            @Override
            public void run () {
    
                try {
                    try ( SmbResource f = createTestFile() ) {
                        try {
                            // f.exists();
                            // try ( OutputStream os = f.openOutputStream(false, SmbConstants.FILE_NO_SHARE) ) {
                            // os.write(new byte[] {
    Java
    - Registered: Sun Apr 21 00:10:10 GMT 2024
    - Last Modified: Sun Nov 14 17:40:50 GMT 2021
    - 17.6K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/base/ThrowablesTest.java

    @GwtCompatible(emulated = true)
    public class ThrowablesTest extends TestCase {
      public void testThrowIfUnchecked_Unchecked() {
        try {
          throwIfUnchecked(new SomeUncheckedException());
          fail();
        } catch (SomeUncheckedException expected) {
        }
      }
    
      public void testThrowIfUnchecked_Error() {
        try {
          throwIfUnchecked(new SomeError());
          fail();
        } catch (SomeError expected) {
        }
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 23.6K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/base/ThrowablesTest.java

    @GwtCompatible(emulated = true)
    public class ThrowablesTest extends TestCase {
      public void testThrowIfUnchecked_Unchecked() {
        try {
          throwIfUnchecked(new SomeUncheckedException());
          fail();
        } catch (SomeUncheckedException expected) {
        }
      }
    
      public void testThrowIfUnchecked_Error() {
        try {
          throwIfUnchecked(new SomeError());
          fail();
        } catch (SomeError expected) {
        }
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 23.6K bytes
    - Viewed (0)
  6. src/main/java/jcifs/smb/SmbTreeConnection.java

            }
        }
    
    
        synchronized void disconnect ( boolean inError ) {
            try ( SmbSessionImpl session = getSession() ) {
                if ( session == null ) {
                    return;
                }
                try ( SmbTransportImpl transport = session.getTransport() ) {
                    synchronized ( transport ) {
                        SmbTreeImpl t = getTreeInternal();
    Java
    - Registered: Sun Apr 21 00:10:10 GMT 2024
    - Last Modified: Tue Jul 07 10:50:16 GMT 2020
    - 31K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/base/PreconditionsTest.java

      public void testCheckArgument_simple_failure() {
        try {
          Preconditions.checkArgument(false);
          fail("no exception thrown");
        } catch (IllegalArgumentException expected) {
        }
      }
    
      public void testCheckArgument_simpleMessage_success() {
        Preconditions.checkArgument(true, IGNORE_ME);
      }
    
      public void testCheckArgument_simpleMessage_failure() {
        try {
          Preconditions.checkArgument(false, new Message());
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 19.8K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/math/MathPreconditionsTest.java

      public void testCheckPositive_zeroInt() {
        try {
          MathPreconditions.checkPositive("int", 0);
          fail();
        } catch (IllegalArgumentException expected) {
        }
      }
    
      public void testCheckPositive_maxInt() {
        MathPreconditions.checkPositive("int", Integer.MAX_VALUE);
      }
    
      public void testCheckPositive_minInt() {
        try {
          MathPreconditions.checkPositive("int", Integer.MIN_VALUE);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 8.2K bytes
    - Viewed (0)
  9. src/test/java/org/codelibs/fess/thumbnail/impl/HtmlTagBasedGeneratorTest.java

            String imagePath = "thumbnail/600x400.png";
            try (ImageInputStream input = ImageIO.createImageInputStream(classLoader.getResourceAsStream(imagePath))) {
                generator.saveImage(input, outputFile);
            }
            assertImageSize(outputFile, 100, 66);
    
            imagePath = "thumbnail/600x400.gif";
    Java
    - Registered: Mon Apr 22 08:04:10 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  10. src/test/java/jcifs/tests/SessionTest.java

            try ( SmbResource f = new SmbFile(getTestShareURL(), ctx); ) {
                checkConnection(f);
                f.resolve("test").exists();
            }
        }
    
    
        @Test
        public void logonAnonymous () throws IOException {
            try ( SmbResource f = new SmbFile(getTestShareGuestURL(), withAnonymousCredentials()) ) {
    Java
    - Registered: Sun Apr 21 00:10:10 GMT 2024
    - Last Modified: Thu Jan 05 13:09:03 GMT 2023
    - 15.8K bytes
    - Viewed (0)
Back to top