@Override public void close() throws IOException { this.rac.close(); }
@Override public void close() throws IOException { this.rac.close(); }
public void close() throws IOException { rac.close(); } }
public void close() throws IOException { rac.close(); } }
/** * Closes this content. * * @throws IOException if an error occurs. */ @Override public void close() throws IOException { if (finished) { return; } // Close the output stream IOException exc = null; try { content.close(); } catch (final IOException ioe) { exc = ioe; } // Notify of end of output exc = null; try { onClose(); } catch (final IOException ioe) { exc = ioe; } finished = true; if (exc != null) { throw exc; } }
/** * Closes this content. * * @throws IOException if an error occurs. */ @Override public void close() throws IOException { if (finished) { return; } // Close the output stream IOException exc = null; try { content.close(); } catch (final IOException ioe) { exc = ioe; } // Notify of end of output exc = null; try { onClose(); } catch (final IOException ioe) { exc = ioe; } finished = true; if (exc != null) { throw exc; } }
/** * Closes this content. * * @throws IOException if an error occurs. */ @Override public void close() throws IOException { if (finished) { return; } // Close the output stream IOException exc = null; try { content.close(); } catch (final IOException ioe) { exc = ioe; } // Notify of end of output exc = null; try { onClose(); } catch (final IOException ioe) { exc = ioe; } finished = true; if (exc != null) { throw exc; } }
try content.close();
@Test public void testRandomAccessContent2() throws Exception { final FileObject fo = manager.resolveFile(TEST_DIR1); Assert.assertNotNull(fo); Assert.assertFalse(fo.exists()); // Create the test file final FileObject file = createTestFile(hdfs); Assert.assertTrue(fo.exists()); file.getContent().getRandomAccessContent(RandomAccessMode.READ).close(); }
@Test(expected = FileSystemException.class) public void testRandomAccessContent() throws Exception { final FileObject fo = manager.resolveFile(TEST_DIR1); Assert.assertNotNull(fo); Assert.assertFalse(fo.exists()); // Create the test file final FileObject file = createTestFile(hdfs); Assert.assertTrue(fo.exists()); file.getContent().getRandomAccessContent(RandomAccessMode.READWRITE).close(); }
@Test public void testRandomAccessContent2() throws Exception { final FileObject fo = manager.resolveFile(TEST_DIR1); Assert.assertNotNull(fo); Assert.assertFalse(fo.exists()); // Create the test file final FileObject file = createTestFile(hdfs); Assert.assertTrue(fo.exists()); file.getContent().getRandomAccessContent(RandomAccessMode.READ).close(); }
@Test(expected = FileSystemException.class) public void testRandomAccessContent() throws Exception { final FileObject fo = manager.resolveFile(TEST_DIR1); Assert.assertNotNull(fo); Assert.assertFalse(fo.exists()); // Create the test file final FileObject file = createTestFile(hdfs); Assert.assertTrue(fo.exists()); file.getContent().getRandomAccessContent(RandomAccessMode.READWRITE).close(); }
reader.close(); reader = fileObject.getContent().getRandomAccessContent(RandomAccessMode.READ); reader.seek(position);