Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for openOutputStream (0.23 sec)

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

         * @author Ilan Goldfeld
         */
        // #261
        @Test
        public void testExistsOnLock () throws IOException {
            try ( SmbFile f = createTestFile();
                  SmbFileOutputStream ostream = f.openOutputStream(true, SmbConstants.FILE_NO_SHARE);
                  SmbFile checkFile = new SmbFile(f.getCanonicalPath(), f.getContext()) ) {
    
                try {
                    assertTrue(checkFile.exists());
                }
    Java
    - Registered: Sun Apr 28 00:10:09 GMT 2024
    - Last Modified: Thu Jan 05 13:09:03 GMT 2023
    - 12.3K bytes
    - Viewed (0)
  2. src/test/java/jcifs/tests/ConcurrencyTest.java

            String fname = makeRandomName();
            try ( SmbFile sr = getDefaultShareRoot();
                  SmbResource exclFile = new SmbFile(sr, fname) ) {
    
                try ( OutputStream s = exclFile.openOutputStream(false, SmbConstants.FILE_NO_SHARE) ) {
                    try {
                        exclFile.delete();
                        fail("Could remove locked file");
                    }
                    catch ( SmbException e ) {
    Java
    - Registered: Sun Apr 28 00:10:09 GMT 2024
    - Last Modified: Sun Nov 14 17:40:50 GMT 2021
    - 17.6K bytes
    - Viewed (0)
  3. src/test/java/jcifs/tests/ReadWriteTest.java

            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 28 00:10:09 GMT 2024
    - Last Modified: Sun Jul 01 13:12:10 GMT 2018
    - 13.2K bytes
    - Viewed (0)
  4. src/test/java/jcifs/tests/RandomAccessFileTest.java

        }
    
    
        @Test
        public void testReadOnly () throws IOException {
            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 28 00:10:09 GMT 2024
    - Last Modified: Sun Jul 01 13:12:10 GMT 2018
    - 11.4K bytes
    - Viewed (0)
  5. src/main/java/jcifs/SmbResource.java

         * @throws CIFSException
         */
        OutputStream openOutputStream ( boolean append ) throws CIFSException;
    
    
        /**
         * Opens an output stream writing to the file (truncating, write only, sharable)
         * 
         * @return output stream, needs to be closed when finished
         * @throws CIFSException
         */
        OutputStream openOutputStream () throws CIFSException;
    
    
        /**
    Java
    - Registered: Sun Apr 28 00:10:09 GMT 2024
    - Last Modified: Sun Dec 20 14:09:34 GMT 2020
    - 26K bytes
    - Viewed (0)
  6. src/test/java/jcifs/tests/FileOperationsTest.java

            long length = 4096 * 16 + 512;
            try ( SmbFile f = createTestDirectory();
                  SmbResource e = new SmbFile(f, "test") ) {
                e.createNewFile();
    
                try ( OutputStream os = e.openOutputStream() ) {
                    ReadWriteTest.writeRandom(bufSize, length, os);
                }
    
                try ( SmbFile d1 = createTestDirectory();
                      SmbFile t = new SmbFile(d1, makeRandomName()) ) {
    Java
    - Registered: Sun Apr 28 00:10:09 GMT 2024
    - Last Modified: Thu Jan 05 13:17:59 GMT 2023
    - 16.3K bytes
    - Viewed (0)
  7. src/main/java/jcifs/smb/SmbFile.java

        @Override
        public SmbFileOutputStream openOutputStream () throws SmbException {
            return new SmbFileOutputStream(this);
        }
    
    
        @Override
        public SmbFileOutputStream openOutputStream ( boolean append ) throws SmbException {
            return openOutputStream(append, FILE_SHARE_READ);
        }
    
    
        @Override
    Java
    - Registered: Sun Apr 28 00:10:09 GMT 2024
    - Last Modified: Mon Mar 13 12:00:57 GMT 2023
    - 81.6K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/io/Closer.java

     *
     * <pre>{@code
     * Closer closer = Closer.create();
     * try {
     *   InputStream in = closer.register(openInputStream());
     *   OutputStream out = closer.register(openOutputStream());
     *   // 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);
    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)
Back to top