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 voidclose()Closes this output stream.final voidflush()Flushes this output stream.final StringgetName()Returns the filename of this output stream.final voidwrite(byte[] b) Writes a byte array to this output stream.final voidwrite(byte[] b, int off, int len) Writes a byte array to this output stream.final voidwrite(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:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException- See Also:
-
flush
Flushes this output stream. SeeOutputStream.flush()for documentation about this method.- Specified by:
flushin interfaceFlushable- Overrides:
flushin 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:
writein 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:
writein classOutputStream- Throws:
IOException- See Also:
-
write
Writes a single byte to this output stream. SeeFileOutputStream.write(int)for documentation about this method.- Specified by:
writein classOutputStream- Throws:
IOException- See Also:
-