Class HdfsFileObject
java.lang.Object
org.apache.commons.vfs2.provider.AbstractFileObject<HdfsFileSystem>
org.apache.commons.vfs2.provider.hdfs.HdfsFileObject
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- Comparable<FileObject>,- Iterable<FileObject>,- FileObject
A VFS representation of an HDFS file.
- Since:
- 2.1
- 
Field SummaryFields inherited from class org.apache.commons.vfs2.provider.AbstractFileObjectDEFAULT_BUFFER_SIZEFields inherited from interface org.apache.commons.vfs2.FileObjectEMPTY_ARRAY
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedHdfsFileObject(AbstractFileName name, HdfsFileSystem fs, org.apache.hadoop.fs.FileSystem hdfs, org.apache.hadoop.fs.Path path) Constructs a new HDFS FileObject
- 
Method SummaryModifier and TypeMethodDescriptionbooleancanRenameTo(FileObject newfile) protected voiddoAttach()protected voidprotected voiddoDelete()protected longprotected InputStreamdoGetInputStream(int bufferSize) protected longprotected OutputStreamdoGetOutputStream(boolean append) protected RandomAccessContentprotected FileTypeprotected booleanprotected booleanprotected booleanprotected String[]protected FileObject[]protected voiddoRemoveAttribute(String attrName) protected voiddoRename(FileObject newfile) protected voiddoSetAttribute(String attrName, Object value) protected booleandoSetLastModifiedTime(long modtime) booleanexists()Methods inherited from class org.apache.commons.vfs2.provider.AbstractFileObjectchildrenChanged, close, compareTo, copyFrom, createFile, createFolder, delete, delete, deleteAll, doCreateFileContent, doDetach, doGetCertificates, doGetInputStream, doIsExecutable, doIsSameFile, doIsSymbolicLink, doSetExecutable, doSetReadable, doSetWritable, endOutput, finalize, findFiles, findFiles, getAbstractFileSystem, getChild, getChildren, getContent, getFileContentInfoFactory, getFileOperations, getFileSystem, getInputStream, getInputStream, getName, getOutputStream, getOutputStream, getParent, getPublicURIString, getRandomAccessContent, getType, getURL, handleChanged, handleCreate, handleDelete, holdObject, injectType, isAttached, isContentOpen, isExecutable, isFile, isFolder, isHidden, isReadable, isSameFile, isSymbolicLink, isWriteable, iterator, listFiles, moveTo, notifyAllStreamsClosed, onChange, onChildrenChanged, refresh, resolveFile, resolveFile, setExecutable, setReadable, setWritable, toStringMethods inherited from class java.lang.Objectclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.commons.vfs2.FileObjectgetPath, getURIMethods inherited from interface java.lang.IterableforEach, spliterator
- 
Constructor Details- 
HdfsFileObjectprotected HdfsFileObject(AbstractFileName name, HdfsFileSystem fs, org.apache.hadoop.fs.FileSystem hdfs, org.apache.hadoop.fs.Path path) Constructs a new HDFS FileObject- Parameters:
- name- FileName
- fs- HdfsFileSystem instance
- hdfs- Hadoop FileSystem instance
- path- Path to the file in HDFS
 
 
- 
- 
Method Details- 
canRenameTo- Specified by:
- canRenameToin interface- FileObject
- Overrides:
- canRenameToin class- AbstractFileObject<HdfsFileSystem>
- See Also:
 
- 
doAttach- Overrides:
- doAttachin class- AbstractFileObject<HdfsFileSystem>
- Throws:
- Exception
- See Also:
 
- 
doCreateFolder- Overrides:
- doCreateFolderin class- AbstractFileObject<HdfsFileSystem>
- Throws:
- Exception
- Since:
- 2.7.0
- See Also:
 
- 
doDelete- Overrides:
- doDeletein class- AbstractFileObject<HdfsFileSystem>
- Throws:
- Exception
- Since:
- 2.7.0
- See Also:
 
- 
doGetAttributes- Overrides:
- doGetAttributesin class- AbstractFileObject<HdfsFileSystem>
- Throws:
- Exception
- See Also:
 
- 
doGetContentSize- Specified by:
- doGetContentSizein class- AbstractFileObject<HdfsFileSystem>
- Throws:
- Exception
- See Also:
 
- 
doGetInputStream- Overrides:
- doGetInputStreamin class- AbstractFileObject<HdfsFileSystem>
- Throws:
- Exception
- See Also:
 
- 
doGetLastModifiedTime- Overrides:
- doGetLastModifiedTimein class- AbstractFileObject<HdfsFileSystem>
- Throws:
- Exception
- See Also:
 
- 
doGetOutputStream- Overrides:
- doGetOutputStreamin class- AbstractFileObject<HdfsFileSystem>
- Throws:
- Exception
- Since:
- 2.7.0
- See Also:
 
- 
doGetRandomAccessContent- Overrides:
- doGetRandomAccessContentin class- AbstractFileObject<HdfsFileSystem>
- Throws:
- Exception
- See Also:
 
- 
doGetType- Specified by:
- doGetTypein class- AbstractFileObject<HdfsFileSystem>
- Throws:
- Exception
- See Also:
 
- 
doIsHidden- Overrides:
- doIsHiddenin class- AbstractFileObject<HdfsFileSystem>
- Throws:
- Exception
- See Also:
 
- 
doIsReadable- Overrides:
- doIsReadablein class- AbstractFileObject<HdfsFileSystem>
- Throws:
- Exception
- See Also:
 
- 
doIsWriteable- Overrides:
- doIsWriteablein class- AbstractFileObject<HdfsFileSystem>
- Throws:
- Exception
- See Also:
 
- 
doListChildren- Specified by:
- doListChildrenin class- AbstractFileObject<HdfsFileSystem>
- Throws:
- Exception
- See Also:
 
- 
doListChildrenResolved- Overrides:
- doListChildrenResolvedin class- AbstractFileObject<HdfsFileSystem>
- Throws:
- Exception
- See Also:
 
- 
doRemoveAttribute- Overrides:
- doRemoveAttributein class- AbstractFileObject<HdfsFileSystem>
- Throws:
- Exception
- See Also:
 
- 
doRename- Overrides:
- doRenamein class- AbstractFileObject<HdfsFileSystem>
- Throws:
- Exception
- Since:
- 2.7.0
- See Also:
 
- 
doSetAttribute- Overrides:
- doSetAttributein class- AbstractFileObject<HdfsFileSystem>
- Throws:
- Exception
- See Also:
 
- 
doSetLastModifiedTime- Overrides:
- doSetLastModifiedTimein class- AbstractFileObject<HdfsFileSystem>
- Throws:
- Exception
- See Also:
 
- 
exists- Specified by:
- existsin interface- FileObject
- Overrides:
- existsin class- AbstractFileObject<HdfsFileSystem>
- Returns:
- boolean true if file exists, false if not
- Throws:
- FileSystemException
- See Also:
 
 
-