|
|||||||||
Home >> All >> [ Freenet overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |
Freenet
Class RawMessage

java.lang.ObjectFreenet.RawMessage
- public class RawMessage
- extends java.lang.Object
Field Summary | |
protected static char[] |
crlf
|
static boolean |
debug
|
protected static char[] |
endfn
|
protected java.util.Hashtable |
fields
|
java.lang.String |
messageType
The type of the message |
java.lang.Long |
trailingFieldLength
|
java.lang.String |
trailingFieldName
|
java.io.InputStream |
trailingFieldStream
|
Constructor Summary | |
RawMessage(java.io.InputStream i)
|
|
RawMessage(java.lang.String name)
|
Method Summary | |
void |
deleteField(java.lang.String name)
|
java.util.Enumeration |
fieldNames()
|
java.io.InputStream |
getTrailing()
|
boolean |
isKeepAlive()
|
static void |
main(java.lang.String[] args)
Test method |
java.lang.String |
readField(java.lang.String name)
|
protected java.lang.String |
readTo(java.io.PushbackInputStream i,
char[] tms)
Will return String from InputStream until one of the characters in tms is about to be read. |
protected void |
remCRLF(java.io.PushbackInputStream i)
Removes any CRLFs from the part of the stream to be read next |
void |
setField(java.lang.String name,
java.lang.String value)
|
protected boolean |
testEOF(java.io.PushbackInputStream i)
Checks non-destructively whether we have received an EOF |
java.io.InputStream |
toInputStream()
|
java.lang.String |
toString()
Convert this Object to a human-readable String. |
long |
trailingFieldLength()
|
void |
writeMessage(java.io.OutputStream out)
|
void |
writeTrailing(java.io.OutputStream out)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
debug
public static final boolean debug
- See Also:
- Constant Field Values
messageType
public java.lang.String messageType
- The type of the message
trailingFieldLength
public java.lang.Long trailingFieldLength
trailingFieldName
public java.lang.String trailingFieldName
trailingFieldStream
public java.io.InputStream trailingFieldStream
fields
protected java.util.Hashtable fields
crlf
protected static final char[] crlf
endfn
protected static final char[] endfn
Constructor Detail |
RawMessage
public RawMessage(java.io.InputStream i) throws InvalidMessageException, java.io.EOFException
RawMessage
public RawMessage(java.lang.String name)
Method Detail |
main
public static void main(java.lang.String[] args) throws java.lang.Exception
- Test method
trailingFieldLength
public long trailingFieldLength()
isKeepAlive
public boolean isKeepAlive()
deleteField
public void deleteField(java.lang.String name)
readField
public java.lang.String readField(java.lang.String name)
setField
public void setField(java.lang.String name, java.lang.String value)
fieldNames
public java.util.Enumeration fieldNames()
toInputStream
public java.io.InputStream toInputStream() throws java.io.IOException
getTrailing
public java.io.InputStream getTrailing()
writeMessage
public void writeMessage(java.io.OutputStream out) throws java.io.IOException
writeTrailing
public void writeTrailing(java.io.OutputStream out)
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object
- Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string concatenation with this object. If the result is
null
, string concatenation will instead use"null"
.The default implementation returns
getClass().getName() + "@" + Integer.toHexString(hashCode())
.
remCRLF
protected void remCRLF(java.io.PushbackInputStream i) throws java.io.IOException
- Removes any CRLFs from the part of the stream to be
read next
testEOF
protected boolean testEOF(java.io.PushbackInputStream i) throws java.io.IOException
- Checks non-destructively whether we have received an EOF
readTo
protected java.lang.String readTo(java.io.PushbackInputStream i, char[] tms) throws java.io.IOException, java.io.EOFException
- Will return String from InputStream until one of
the characters in tms is about to be read.
|
|||||||||
Home >> All >> [ Freenet overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |