Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package de.unistuttgart.iaas.icetea.io;
- import java.io.FileOutputStream;
- import java.io.IOException;
- import java.io.ObjectOutputStream;
- public class BinaryFileWriter extends ObjectOutputStream {
- private String filePath;
- /**
- * Standard constructor
- * @param filePath
- * @throws IOException
- * @throws SecurityException
- */
- public BinaryFileWriter(String filePath) throws IOException, SecurityException {
- super(new FileOutputStream(filePath));
- this.filePath = filePath;
- }
- public String getPath() {
- return this.filePath;
- }
- public void write(Object... objects) throws IOException {
- Object[] obj = objects;
- for(Object o : obj) {
- writeObject(o);
- }
- close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement