org.mortbay.jetty
Class MultiPartResponse

java.lang.Object
  extended by org.mortbay.jetty.MultiPartResponse

public class MultiPartResponse
extends Object

Handle a multipart MIME response.

Author:
Greg Wilkins, Jim Crossley

Field Summary
private static byte[] __CRLF
           
private static byte[] __DASHDASH
           
private  String boundary
           
private  byte[] boundaryBytes
           
private  boolean inPart
           
private  OutputStream out
          PrintWriter to write content too.
 
Constructor Summary
private MultiPartResponse()
           
  MultiPartResponse(OutputStream out)
           
 
Method Summary
 void close()
          End the current part.
 String getBoundary()
           
 OutputStream getOut()
           
 void startPart(String contentType)
          Start creation of the next Content.
 void startPart(String contentType, String[] headers)
          Start creation of the next Content.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

__CRLF

private static byte[] __CRLF

__DASHDASH

private static byte[] __DASHDASH

boundary

private String boundary

boundaryBytes

private byte[] boundaryBytes

out

private OutputStream out
PrintWriter to write content too.


inPart

private boolean inPart
Constructor Detail

MultiPartResponse

private MultiPartResponse()

MultiPartResponse

public MultiPartResponse(OutputStream out)
                  throws IOException
Throws:
IOException
Method Detail

getBoundary

public String getBoundary()

getOut

public OutputStream getOut()

startPart

public void startPart(String contentType)
               throws IOException
Start creation of the next Content.

Throws:
IOException

startPart

public void startPart(String contentType,
                      String[] headers)
               throws IOException
Start creation of the next Content.

Throws:
IOException

close

public void close()
           throws IOException
End the current part.

Throws:
IOException - IOException