4 public static class FileInputStream : Stream{
13 filehandler = XPlatform.openSystemFile(path,
_system_.
READ | mode);
14 if (filehandler == -1){
22 String path = file.getPath();
26 filehandler = XPlatform.openSystemFile(path,
_system_.
READ | mode);
27 if (filehandler == -1){
38 filehandler = XPlatform.openSystemFile(path,
_system_.
READ);
39 if (filehandler == -1){
47 String path = file.getPath();
51 filehandler = XPlatform.openSystemFile(path,
_system_.
READ);
52 if (filehandler == -1){
57 String path = dir.getPath();
62 filehandler = XPlatform.openSystemFile(path,
_system_.
READ);
63 if (filehandler == -1){
68 if (filehandler != -1){
75 filehandler = XPlatform.openSystemFile(path,
_system_.
READ);
76 return filehandler != -1;
80 if (filehandler == -1){
85 return length() - getPosition();
104 byte[] data =
new byte[length()];
111 return _system_.
read(filehandler, data, position, length);
114 public int write(@NotNilptr
byte [] ,
int ,
int )
override{
119 if (filehandler != -1){
132 public static class FileOutputStream :
Stream{
138 filehandler = XPlatform.openSystemFile(path, mode);
139 if (filehandler == -1){
148 if (filehandler == -1){
157 if (filehandler == -1){
163 String path = file.getPath();
168 if (filehandler == -1){
173 String path = file.getPath();
177 filehandler = XPlatform.openSystemFile(path, mode);
178 if (filehandler == -1){
183 String path = file.getPath();
188 if (filehandler == -1){
193 String path = dir.getPath();
199 if (filehandler == -1){
204 if (filehandler != -1){
212 return filehandler != -1;
215 if (filehandler == -1){
222 public long seek(
int ,
long )
override{
239 public int read(@NotNilptr
byte [] ,
int ,
int )
override{
254 if (filehandler != -1){
static final long read(long, byte[], long, long)
static final long getLength(long)
static final long getSeek(long)
static final long write(long, byte[], long, long)
static final long seek(long, int, long)
static final bool close(long)
int write(byte [] data , int position, int length) override
FileOutputStream(@NotNilptr File file, int mode)
FileOutputStream(@NotNilptr File dir,@NotNilptr String file, bool append)
long seek(int , long ) override
FileOutputStream(@NotNilptr File file, bool append)
int read(@NotNilptr byte [] , int , int ) override
FileOutputStream(@NotNilptr File file)
FileOutputStream(String path, int mode)
long getPosition() override
FileOutputStream(String path, bool append)
long write(@NotNilptr byte [] data)
FileOutputStream(String path)
bool attach(String path, bool append)
long available(bool ) override
String appendPath(String)