public class File extends Object
Modifier and Type | Field and Description |
---|---|
static int |
SEEK_CUR |
static int |
SEEK_END |
static int |
SEEK_SET |
Constructor and Description |
---|
File()
Constructor.
|
File(File file)
Constructor.
|
File(String filePath,
String mode)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
endOfFile() |
static String |
ensureCanonicalName(String fileName) |
static boolean |
exist(String path) |
void |
flush() |
int |
getc() |
String |
getLine(int separator) |
String |
getLine(int separator,
int separator2) |
void |
getLine(StringBuilder stringBuilder,
int separator) |
void |
getLine(StringBuilder stringBuilder,
int separator,
int separator2) |
byte[] |
gets(byte[] string,
int offeset,
int maxCount) |
String |
gets(int maxLength) |
void |
ignore(int nSymbols) |
void |
ignore(int nSymbols,
int delimiter) |
static boolean |
isAbsolutePath(String path) |
long |
length() |
boolean |
open(String filePath,
String mode) |
String |
path() |
int |
read(byte[] buffer,
int bufferLength) |
static void |
remove(String fileName) |
static void |
rename(String oldFileName,
String newFileName) |
void |
seek(long offset) |
void |
seek(long offset,
int origin) |
long |
tell() |
String |
toString() |
FileLock |
tryLock() |
void |
write(byte value) |
void |
write(byte[] buf) |
void |
write(byte[] buf,
int offset,
int length) |
void |
write(ByteBuffer value) |
void |
write(String value) |
public static final int SEEK_CUR
public static final int SEEK_END
public static final int SEEK_SET
public File()
public File(File file)
file
- a File to be copiedpublic File(String filePath, String mode) throws IOException
filePath
- a pathname stringmode
- the access modeIOException
- in case of file not foundpublic void close() throws IOException
IOException
public FileLock tryLock() throws IOException
IOException
public long length() throws IOException
IOException
public boolean endOfFile()
public static boolean exist(String path)
public String path()
public int getc()
public void getLine(StringBuilder stringBuilder, int separator) throws IOException
IOException
public String getLine(int separator) throws IOException
IOException
public void getLine(StringBuilder stringBuilder, int separator, int separator2) throws IOException
IOException
public String getLine(int separator, int separator2) throws IOException
IOException
public byte[] gets(byte[] string, int offeset, int maxCount)
public String gets(int maxLength)
public void ignore(int nSymbols, int delimiter)
public void ignore(int nSymbols)
public static boolean isAbsolutePath(String path)
public void flush() throws IOException
IOException
public int read(byte[] buffer, int bufferLength) throws IOException
IOException
public static void remove(String fileName) throws IOException
IOException
public static void rename(String oldFileName, String newFileName) throws IOException
IOException
public void seek(long offset) throws IOException
IOException
public void seek(long offset, int origin) throws IOException
IOException
public long tell() throws IOException
IOException
public void write(byte value) throws IOException
IOException
public void write(byte[] buf) throws IOException
IOException
public void write(ByteBuffer value) throws IOException
IOException
public void write(String value) throws IOException
IOException
public void write(byte[] buf, int offset, int length) throws IOException
IOException
Copyright © 2005–2024 Onix Solutions. All rights reserved.