/*
 * Java Network Programming, Second Edition
 * Merlin Hughes, Michael Shoffner, Derek Hamner
 * Manning Publications Company; ISBN 188477749X
 *
 * http://nitric.com/jnp/
 *
 * Copyright (c) 1997-1999 Merlin Hughes, Michael Shoffner, Derek Hamner;
 * all rights reserved; see license.txt for details.
 */

import java.io.*;

public class SimpleOverwritingFileOutputStream extends OutputStream {
  protected RandomAccessFile file;

  public SimpleOverwritingFileOutputStream (String filename) throws IOException {
    file = new RandomAccessFile (filename, "rw");
  }

  public void write (int datum) throws IOException {
    file.write (datum);
  }

  public void close () throws IOException {
    file.close ();
  }
}
