org.dmonix.io
Class RemoveLineCommentOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.dmonix.io.RemoveLineCommentOutputStream
- public class RemoveLineCommentOutputStream
- extends java.io.FilterOutputStream
Removes all Java style line comments "//" from the outputstream.
All data after a found line comment is ignored until a line feed or or
carriage return is found.
In practice it removes the rest of the line from where the comment
was found.
Copyright: Copyright (c) 2004
Company: dmonix.org
- Version:
- 1.0
- Author:
- Peter Nerg
| Fields inherited from class java.io.FilterOutputStream |
out |
|
Method Summary |
void |
close()
|
void |
write(byte[] b)
Writes an array of bytes.
|
void |
write(byte[] b,
int off,
int len)
Writes an array of bytes.
|
void |
write(int b)
Writes a single byte value.
|
| Methods inherited from class java.io.FilterOutputStream |
flush |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RemoveLineCommentOutputStream
public RemoveLineCommentOutputStream(java.io.OutputStream out)
close
public void close()
throws java.io.IOException
- Throws:
java.io.IOException
write
public void write(byte[] b)
throws java.io.IOException
- Writes an array of bytes.
Invoking this method equals
write(b, 0, b.length);
- Parameters:
b - The data
- Throws:
java.io.IOException
write
public void write(int b)
throws java.io.IOException
- Writes a single byte value.
If the method detects two adjacent '/' signs all data up until the next
line feed or carriage return is ignored, including the two '/' signs.
- Parameters:
b - The data
- Throws:
java.io.IOException
write
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
- Writes an array of bytes.
The method will invoke write(int b) for each
byte in the array that is to be written.
- Parameters:
b - The dataoff - The position to start in the arraylen - The amount of data to use from the array
- Throws:
java.io.IOException
Copyright © 1998-2005 dmonix.org Peter Nerg, All Rights Reserved.