public class RobocodeFileOutputStream extends OutputStream
FileOutputStream
and is used for streaming/writing data out to a file, which you got
previously by calling getDataFile()
.
You should read FileOutputStream
for documentation of this
class.
Please notice that the max. size of your data file is set to 200000 (~195 KB).
AdvancedRobot.getDataFile(String)
,
FileOutputStream
Constructor and Description |
---|
RobocodeFileOutputStream(File file)
Constructs a new RobocodeFileOutputStream.
|
RobocodeFileOutputStream(FileDescriptor fdObj)
Deprecated.
|
RobocodeFileOutputStream(String fileName)
Constructs a new RobocodeFileOutputStream.
|
RobocodeFileOutputStream(String fileName,
boolean append)
Constructs a new RobocodeFileOutputStream.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this output stream.
|
void |
flush()
Flushes this output stream.
|
String |
getName()
Returns the filename of this output stream.
|
void |
write(byte[] b)
Writes a byte array to this output stream.
|
void |
write(byte[] b,
int off,
int len)
Writes a byte array to this output stream.
|
void |
write(int b)
Writes a single byte to this output stream.
|
public RobocodeFileOutputStream(File file) throws IOException
FileOutputStream(File)
for documentation about this constructor.file
- streamIOException
- when file could not be createdFileOutputStream(File)
@Deprecated public RobocodeFileOutputStream(FileDescriptor fdObj)
FileOutputStream(FileDescriptor)
for documentation about this constructor.fdObj
- desciptorFileOutputStream(FileDescriptor)
public RobocodeFileOutputStream(String fileName) throws IOException
FileOutputStream(String)
for documentation about this constructor.fileName
- file nameIOException
- when file could not be createdFileOutputStream(String)
public RobocodeFileOutputStream(String fileName, boolean append) throws IOException
FileOutputStream(String, boolean)
for documentation about this constructor.fileName
- file nameappend
- should append at the end of the fileIOException
- when file could not be createdFileOutputStream(String, boolean)
public final void close() throws IOException
FileOutputStream.close()
for documentation about this method.close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
FileOutputStream.close()
public final void flush() throws IOException
OutputStream.flush()
for documentation about this method.flush
in interface Flushable
flush
in class OutputStream
IOException
OutputStream.flush()
public final String getName()
public final void write(byte[] b) throws IOException
FileOutputStream.write(byte[])
for documentation
about this method.write
in class OutputStream
IOException
FileOutputStream.write(byte[])
public final void write(byte[] b, int off, int len) throws IOException
FileOutputStream.write(byte[], int, int)
for
documentation about this method.write
in class OutputStream
IOException
FileOutputStream.write(byte[], int, int)
public final void write(int b) throws IOException
FileOutputStream.write(int)
for documentation about
this method.write
in class OutputStream
IOException
FileOutputStream.write(int)
Copyright © 2021 Robocode. All Rights Reserved.