List of usage examples for org.apache.commons.vfs2.util RandomAccessMode READWRITE
RandomAccessMode READWRITE
To view the source code for org.apache.commons.vfs2.util RandomAccessMode READWRITE.
Click Source Link
From source file:org.apache.accumulo.start.classloader.vfs.providers.HdfsFileObject.java
@Override protected RandomAccessContent doGetRandomAccessContent(final RandomAccessMode mode) throws Exception { if (mode.equals(RandomAccessMode.READWRITE)) { throw new UnsupportedOperationException(); }/*from w w w . j av a 2 s .co m*/ return new HdfsRandomAccessContent(this.path, this.hdfs); }
From source file:org.apache.accumulo.start.classloader.vfs.providers.ReadOnlyHdfsFileProviderTest.java
@Test(expected = FileSystemException.class) public void testRandomAccessContent() throws Exception { FileObject fo = manager.resolveFile(TEST_DIR1); Assert.assertNotNull(fo);/* w w w.j a v a 2s. c om*/ Assert.assertFalse(fo.exists()); // Create the test file FileObject file = createTestFile(hdfs); file.getContent().getRandomAccessContent(RandomAccessMode.READWRITE).close(); }