public class File extends Object
Constructor and Description |
---|
File() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close a file
|
org.apache.hadoop.fs.FSDataOutputStream |
create(boolean overwrite)
Create a file
|
org.apache.hadoop.fs.FSDataOutputStream |
create(String file,
boolean overwrite) |
org.apache.hadoop.fs.FSDataOutputStream |
create(String dir,
String file,
boolean overwrite) |
org.apache.hadoop.fs.FileSystem |
createFs()
Create FileSystem object
|
void |
open(String dir,
String file)
Open an existing file
|
char |
readChar()
Read a character from input
|
org.apache.hadoop.fs.Path |
resolvePath(org.apache.hadoop.fs.Path path)
Get the fully-qualified path
NOTE: FileSystem.resolvePath() is not available in Hadoop 1.2.1
|
String |
toString() |
void |
writeString(String str)
Write string to file
|
public org.apache.hadoop.fs.FileSystem createFs() throws IOException
IOException
public org.apache.hadoop.fs.FSDataOutputStream create(boolean overwrite)
public org.apache.hadoop.fs.FSDataOutputStream create(String dir, String file, boolean overwrite)
public org.apache.hadoop.fs.FSDataOutputStream create(String file, boolean overwrite)
public char readChar() throws IOException
IOException
public void writeString(String str)
public void close()
public org.apache.hadoop.fs.Path resolvePath(org.apache.hadoop.fs.Path path) throws IOException
IOException
Copyright © 2016 The Apache Software Foundation. All rights reserved.