Package robocode

Class RobocodeFileWriter

  • All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.lang.Appendable, java.lang.AutoCloseable

    public class RobocodeFileWriter
    extends java.io.OutputStreamWriter
    RobocodeFileWriter is similar to a FileWriter and is used for writing data out to a file, which you got by calling getDataFile().

    You should read FileWriter 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:
    AdvancedRobot.getDataFile(String), FileWriter
    • Field Summary

      • Fields inherited from class java.io.Writer

        lock
    • Constructor Summary

      Constructors 
      Constructor Description
      RobocodeFileWriter​(java.io.File file)
      Constructs a new RobocodeFileWriter.
      RobocodeFileWriter​(java.io.FileDescriptor fd)
      Constructs a new RobocodeFileWriter.
      RobocodeFileWriter​(java.lang.String fileName)
      Constructs a new RobocodeFileWriter.
      RobocodeFileWriter​(java.lang.String fileName, boolean append)
      Constructs a new RobocodeFileWriter.
    • Method Summary

      • Methods inherited from class java.io.OutputStreamWriter

        append, append, close, flush, getEncoding, write, write, write
      • Methods inherited from class java.io.Writer

        append, nullWriter, write, write
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RobocodeFileWriter

        public RobocodeFileWriter​(java.io.File file)
                           throws java.io.IOException
        Constructs a new RobocodeFileWriter. See FileWriter(File) for documentation about this constructor.
        Parameters:
        file - the file to write to.
        Throws:
        java.io.IOException - if an I/O exception occurs.
        See Also:
        FileWriter(File)
      • RobocodeFileWriter

        public RobocodeFileWriter​(java.io.FileDescriptor fd)
        Constructs a new RobocodeFileWriter. See FileWriter(FileDescriptor) for documentation about this constructor.
        Parameters:
        fd - the file descriptor of the file to write to.
        See Also:
        FileWriter(FileDescriptor)
      • RobocodeFileWriter

        public RobocodeFileWriter​(java.lang.String fileName)
                           throws java.io.IOException
        Constructs a new RobocodeFileWriter. See FileWriter(String) for documentation about this constructor.
        Parameters:
        fileName - the filename of the file to write to.
        Throws:
        java.io.IOException - if an I/O exception occurs.
        See Also:
        FileWriter(String)
      • RobocodeFileWriter

        public RobocodeFileWriter​(java.lang.String fileName,
                                  boolean append)
                           throws java.io.IOException
        Constructs a new RobocodeFileWriter. See FileWriter(String, boolean) for documentation about this constructor.
        Parameters:
        fileName - the filename of the file to write to.
        append - set this to true if the output must be appended to the file.
        Throws:
        java.io.IOException - if an I/O exception occurs.
        See Also:
        FileWriter(String, boolean)