org.apache.wink.common.model.multipart
Class OutMultiPart

java.lang.Object
  extended by org.apache.wink.common.model.multipart.OutMultiPart
Direct Known Subclasses:
BufferedOutMultiPart

public abstract class OutMultiPart
extends java.lang.Object

An abstract class to generate a MultiPart response, the concept behind this class been abstract is that there might be simple implementation over a collection or more complex once like over a database cursor

Author:
elib

Field Summary
static java.lang.String SEP
           
 
Constructor Summary
OutMultiPart()
           
 
Method Summary
 java.lang.String getBoundary()
           
protected abstract  java.util.Iterator<? extends OutPart> getIterator()
          An implementation of this method should return an iterator over the OutPart of the message, this iterator is used to serialized the message
 void setBoundary(java.lang.String boundary)
          set the boundary to be used to separate between the different parts
 void write(java.io.OutputStream os, javax.ws.rs.ext.Providers providers)
          This method write the multiPart message to the os stream, it make a usage of the providers for the serialization of the parts
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SEP

public static final java.lang.String SEP
See Also:
Constant Field Values
Constructor Detail

OutMultiPart

public OutMultiPart()
Method Detail

setBoundary

public void setBoundary(java.lang.String boundary)
set the boundary to be used to separate between the different parts

Parameters:
boundary -

getBoundary

public java.lang.String getBoundary()

getIterator

protected abstract java.util.Iterator<? extends OutPart> getIterator()
An implementation of this method should return an iterator over the OutPart of the message, this iterator is used to serialized the message

Returns:

write

public void write(java.io.OutputStream os,
                  javax.ws.rs.ext.Providers providers)
           throws java.io.IOException
This method write the multiPart message to the os stream, it make a usage of the providers for the serialization of the parts

Parameters:
os -
providers -
Throws:
java.io.IOException


Copyright © 2009 The Apache Software Foundation. All Rights Reserved.