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();
105 byte[] data =
new byte[length()];
112 return _system_.
read(filehandler, data, position, length);
115 public int write(@NotNilptr
byte [] ,
int ,
int )
override{
120 if (filehandler != -1){
133 public static class FileOutputStream :
Stream{
139 filehandler = XPlatform.openSystemFile(path, mode);
140 if (filehandler == -1){
149 if (filehandler == -1){
158 if (filehandler == -1){
164 String path = file.getPath();
169 if (filehandler == -1){
174 String path = file.getPath();
178 filehandler = XPlatform.openSystemFile(path, mode);
179 if (filehandler == -1){
184 String path = file.getPath();
189 if (filehandler == -1){
194 String path = dir.getPath();
200 if (filehandler == -1){
205 if (filehandler != -1){
213 return filehandler != -1;
216 if (filehandler == -1){
223 public long seek(
int ,
long )
override{
240 public int read(@NotNilptr
byte [] ,
int ,
int )
override{
255 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)