gnu.inet.util

Class CRLFInputStream


public class CRLFInputStream
extends FilterInputStream

An input stream that filters out CR/LF pairs into LFs.

Field Summary

static int
CR
The CR octet.
static int
LF
The LF octet.

Constructor Summary

CRLFInputStream(InputStream in)
Constructs a CR/LF input stream connected to the specified input stream.

Method Summary

int
read()
Reads the next byte of data from this input stream.
int
read(byte[] b)
Reads up to b.length bytes of data from this input stream into an array of bytes.
int
read(byte[] b, int off, int len)
Reads up to len bytes of data from this input stream into an array of bytes, starting at the specified offset.

Field Details

CR

public static final int CR
The CR octet.
Field Value:
13

LF

public static final int LF
The LF octet.
Field Value:
10

Constructor Details

CRLFInputStream

public CRLFInputStream(InputStream in)
Constructs a CR/LF input stream connected to the specified input stream.

Method Details

read

public int read()
            throws IOException
Reads the next byte of data from this input stream. Returns -1 if the end of the stream has been reached.

read

public int read(byte[] b)
            throws IOException
Reads up to b.length bytes of data from this input stream into an array of bytes. Returns -1 if the end of the stream has been reached.

read

public int read(byte[] b,
                int off,
                int len)
            throws IOException
Reads up to len bytes of data from this input stream into an array of bytes, starting at the specified offset. Returns -1 if the end of the stream has been reached.