|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.InputStream java.io.FilterInputStream org.finj.filter.ASCIIDataFilterInputStream
public class ASCIIDataFilterInputStream
Filter to be placed on InputStream
when downloading
data in org.finj.FTPConstants.ASCII_DATA_TYPE
.
Exchanges all occurrences of CR, CR/LF, LF/CR, LF for the one that
is correct for the plateform on which org.finj.FTPClient
is running.
FIXME : mention default values.
Copyright (C) 2000-2008 Javier Iglesias.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Field Summary |
---|
Fields inherited from class java.io.FilterInputStream |
---|
in |
Constructor Summary | |
---|---|
|
ASCIIDataFilterInputStream(java.io.InputStream in)
Constructs a new instance of this class, wrapping and filtering in . |
protected |
ASCIIDataFilterInputStream(java.io.InputStream in,
int lineFeed,
int carriageReturn)
Constructs a new instance of this class, resetting the integer values for the LineFeed and CarriageReturn characters to the values provided. |
Method Summary | |
---|---|
int |
read()
Returns one filtered byte from the undelying fields. |
int |
read(byte[] data)
Stores as much filtered data as possible to read from the
underlying stream. |
int |
read(byte[] data,
int offset,
int length)
Stores as much filtered data as possible to read from the
underlying stream. |
Methods inherited from class java.io.FilterInputStream |
---|
available, close, mark, markSupported, reset, skip |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ASCIIDataFilterInputStream(java.io.InputStream in)
in
.
in
- InputStream
to filter.protected ASCIIDataFilterInputStream(java.io.InputStream in, int lineFeed, int carriageReturn)
in
- InputStream
to filter.lineFeed
- value to consider as being the LineFeed character in the table.carriageReturn
- value to consider as being the CarriageReturn character in the table.Method Detail |
---|
public int read() throws java.io.IOException
byte
from the undelying fields.
Any occurrence of LF, or LF+CR, or CR+LF, or CR is replaced by the
local system '\n' character. Decision is left to the JVM !
read
in class java.io.FilterInputStream
java.io.IOException
public int read(byte[] data) throws java.io.IOException
data
as possible to read from the
underlying stream.
read
in class java.io.FilterInputStream
byte
s returned.
java.io.IOException
public int read(byte[] data, int offset, int length) throws java.io.IOException
data
as possible to read from the
underlying stream.
read
in class java.io.FilterInputStream
byte
s returned.
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |