|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.simoes.lpd.util.NetUtil
Provides utility methods helping us to parse the byte streams sent to us from the client.
| Constructor Summary | |
NetUtil()
Default Contructor. |
|
| Method Summary | |
byte[] |
readCommand(java.io.InputStream is)
Reads a command defined by the RFC1179 spec. |
byte[] |
readControlFile(java.io.InputStream is,
java.io.OutputStream os)
Reads the ControlFile and retunrs it as a byte[] |
byte[] |
readNextInput(java.io.InputStream is,
java.io.OutputStream os)
Used by CommandReceiveJob to read the headers of the ControlFile or the DataFile from the client. |
byte[] |
readPrintFile(java.io.InputStream is,
java.io.OutputStream os)
Reads the DataFile and returns it as a byte[] |
byte[] |
readPrintFile(java.io.InputStream is,
java.io.OutputStream os,
int size)
Reads the DataFile and returns it as a byte[] |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public NetUtil()
| Method Detail |
public byte[] readCommand(java.io.InputStream is)
throws java.io.IOException
is - the InputStream providing us with a command from the client.
java.io.IOException - thrown if there is an IO problem
public byte[] readNextInput(java.io.InputStream is,
java.io.OutputStream os)
throws java.io.IOException
ControlFile or the DataFile from the client.
Please see section 6 of the RFC1179 specification for more details.
is - the InputStream from the client sending us the print jobos - the OutputStream to the client we are writing reponses to
java.io.IOException - thrown if there is an IO problem
public byte[] readControlFile(java.io.InputStream is,
java.io.OutputStream os)
throws java.io.IOException
ControlFile and retunrs it as a byte[]
is - the InputStream from the client sending us the control fileos - the OutputStream to the client we are writing reponses to
java.io.IOException - thrown if there is an IO problem
public byte[] readPrintFile(java.io.InputStream is,
java.io.OutputStream os)
throws java.io.IOException
DataFile and returns it as a byte[]
is - the InputStream from the client sending us the data fileos - the OutputStream to the client we are writing reponses to
java.io.IOException - thrown if there is an IO problem
public byte[] readPrintFile(java.io.InputStream is,
java.io.OutputStream os,
int size)
throws java.io.IOException
DataFile and returns it as a byte[]
is - the InputStream from the client sending us the data fileos - the OutputStream to the client we are writing reponses tosize - the number of bytes to read from the stream
java.io.IOException - thrown if there is an IO problem
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||