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() |
void |
flush() |
int |
getc() |
FileChannel |
getFileChannel() |
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() |
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 FileNotFoundException
filePath - a pathname stringmode - the access modeFileNotFoundException - in case of file not foundpublic void close()
throws IOException
IOExceptionpublic FileChannel getFileChannel()
public long length()
throws IOException
IOExceptionpublic boolean endOfFile()
public String path()
public int getc()
public void getLine(StringBuilder stringBuilder, int separator) throws IOException
IOExceptionpublic String getLine(int separator) throws IOException
IOExceptionpublic void getLine(StringBuilder stringBuilder, int separator, int separator2) throws IOException
IOExceptionpublic String getLine(int separator, int separator2) throws IOException
IOExceptionpublic 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
IOExceptionpublic int read(byte[] buffer,
int bufferLength)
throws IOException
IOExceptionpublic static void remove(String fileName) throws IOException
IOExceptionpublic static void rename(String oldFileName, String newFileName) throws IOException
IOExceptionpublic void seek(long offset)
throws IOException
IOExceptionpublic void seek(long offset,
int origin)
throws IOException
IOExceptionpublic long tell()
throws IOException
IOExceptionpublic void write(byte value)
throws IOException
IOExceptionpublic void write(byte[] buf)
throws IOException
IOExceptionpublic void write(ByteBuffer value) throws IOException
IOExceptionpublic void write(String value) throws IOException
IOExceptionpublic void write(byte[] buf,
int offset,
int length)
throws IOException
IOExceptionCopyright © 2014–2025 Onix Solutions. All rights reserved.