Package robocode
Class RobocodeFileOutputStream
java.lang.Object
java.io.OutputStream
robocode.RobocodeFileOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
RobocodeFileOutputStream is similar to a
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).
- Author:
- Mathew A. Nelson (original), Flemming N. Larsen (contributor)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRobocodeFileOutputStream
(File file) Constructs a new RobocodeFileOutputStream.Constructs a new RobocodeFileOutputStream.RobocodeFileOutputStream
(String fileName) Constructs a new RobocodeFileOutputStream.RobocodeFileOutputStream
(String fileName, boolean append) Constructs a new RobocodeFileOutputStream. -
Method Summary
Modifier and TypeMethodDescriptionfinal void
close()
Closes this output stream.final void
flush()
Flushes this output stream.final String
getName()
Returns the filename of this output stream.final void
write
(byte[] b) Writes a byte array to this output stream.final void
write
(byte[] b, int off, int len) Writes a byte array to this output stream.final void
write
(int b) Writes a single byte to this output stream.Methods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
RobocodeFileOutputStream
Constructs a new RobocodeFileOutputStream. SeeFileOutputStream(File)
for documentation about this constructor.- Throws:
IOException
- See Also:
-
RobocodeFileOutputStream
Constructs a new RobocodeFileOutputStream. SeeFileOutputStream(FileDescriptor)
for documentation about this constructor.- See Also:
-
RobocodeFileOutputStream
Constructs a new RobocodeFileOutputStream. SeeFileOutputStream(String)
for documentation about this constructor.- Throws:
IOException
- See Also:
-
RobocodeFileOutputStream
Constructs a new RobocodeFileOutputStream. SeeFileOutputStream(String, boolean)
for documentation about this constructor.- Throws:
IOException
- See Also:
-
-
Method Details
-
close
Closes this output stream. SeeFileOutputStream.close()
for documentation about this method.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
- See Also:
-
flush
Flushes this output stream. SeeOutputStream.flush()
for documentation about this method.- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
- See Also:
-
getName
Returns the filename of this output stream.- Returns:
- the filename of this output stream.
-
write
Writes a byte array to this output stream. SeeFileOutputStream.write(byte[])
for documentation about this method.- Overrides:
write
in classOutputStream
- Throws:
IOException
- See Also:
-
write
Writes a byte array to this output stream. SeeFileOutputStream.write(byte[], int, int)
for documentation about this method.- Overrides:
write
in classOutputStream
- Throws:
IOException
- See Also:
-
write
Writes a single byte to this output stream. SeeFileOutputStream.write(int)
for documentation about this method.- Specified by:
write
in classOutputStream
- Throws:
IOException
- See Also:
-