org.marre.wap
Class WapMimeEncoder

java.lang.Object
  extended byorg.marre.wap.WapMimeEncoder
All Implemented Interfaces:
MimeEncoder

public class WapMimeEncoder
extends java.lang.Object
implements MimeEncoder

Converts mime documents to a wsp encoded stream.

Version:
$Id: WapMimeEncoder.java,v 1.1 2004/11/02 17:59:48 c95men Exp $
Author:
Markus Eriksson

Constructor Summary
WapMimeEncoder()
           
WapMimeEncoder(byte wspEncodingVersion)
           
 
Method Summary
 void writeBody(java.io.OutputStream theOs, MimeBodyPart theMsg)
          Writes the body of the message to the given stream.
 void writeContentType(java.io.OutputStream theOs, MimeBodyPart theMsg)
          Writes an WSP encoded content type header to the given stream.
 void writeHeaders(java.io.OutputStream theOs, MimeBodyPart theMsg)
          Writes the headers of the message to the given stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WapMimeEncoder

public WapMimeEncoder()

WapMimeEncoder

public WapMimeEncoder(byte wspEncodingVersion)
Method Detail

writeContentType

public void writeContentType(java.io.OutputStream theOs,
                             MimeBodyPart theMsg)
                      throws java.io.IOException
Writes an WSP encoded content type header to the given stream.

NOTE! It only writes an WSP encoded content-type to the stream. It does not add the content type header id.

Specified by:
writeContentType in interface MimeEncoder
Parameters:
theOs - The stream to write to
theMsg - The message to get the content-type from
Throws:
java.io.IOException - Thrown if we fail to write the content-type to the stream

writeHeaders

public void writeHeaders(java.io.OutputStream theOs,
                         MimeBodyPart theMsg)
                  throws java.io.IOException
Writes the headers of the message to the given stream.

Specified by:
writeHeaders in interface MimeEncoder
Parameters:
theOs - The stream to write to
theMsg - The message to get the headers from
Throws:
java.io.IOException - Thrown if we fail to write the headers to the stream

writeBody

public void writeBody(java.io.OutputStream theOs,
                      MimeBodyPart theMsg)
               throws java.io.IOException
Writes the body of the message to the given stream.

Specified by:
writeBody in interface MimeEncoder
Parameters:
theOs - The stream to write to
theMsg - The message to get the data from
Throws:
java.io.IOException - Thrown if we fail to write the body to the stream


Copyright © 2002-2005 Markus Eriksson. All Rights Reserved.