org.apache.axis.attachments

Class DimeBodyPart

public class DimeBodyPart extends Object

Holds one attachment DIME part.
Field Summary
protected Objectdata
protected DimeTypeNameFormatdtnf
protected byte[]id
protected static Loglog
protected byte[]type
Constructor Summary
protected DimeBodyPart()
DimeBodyPart(byte[] data, DimeTypeNameFormat format, String type, String id)
Create a DIME Attachment Part.
DimeBodyPart(DataHandler dh, DimeTypeNameFormat format, String type, String id)
Create a DIME Attachment Part.
DimeBodyPart(DataHandler dh, String id)
Create a DIME Attachment Part.
Method Summary
protected longgetDataSize()
protected longgetDataSize(DataHandler dh)
protected voidsendChunk(OutputStream os, byte position, byte[] data, byte chunk)
protected voidsendChunk(OutputStream os, byte position, byte[] data, int offset, int length, byte chunk)
protected voidsendHeader(OutputStream os, byte position, long length, byte chunk)

Field Detail

data

protected Object data

dtnf

protected DimeTypeNameFormat dtnf

id

protected byte[] id

log

protected static Log log

type

protected byte[] type

Constructor Detail

DimeBodyPart

protected DimeBodyPart()

DimeBodyPart

public DimeBodyPart(byte[] data, DimeTypeNameFormat format, String type, String id)
Create a DIME Attachment Part.

Parameters: data a byte array containing the data as the attachment. format the type format for the data. type the type of the data id the ID for the DIME part.

DimeBodyPart

public DimeBodyPart(DataHandler dh, DimeTypeNameFormat format, String type, String id)
Create a DIME Attachment Part.

Parameters: dh the data for the attachment as a JAF datahadler. format the type format for the data. type the type of the data id the ID for the DIME part.

DimeBodyPart

public DimeBodyPart(DataHandler dh, String id)
Create a DIME Attachment Part.

Parameters: dh the data for the attachment as a JAF datahadler. The type and foramt is derived from the DataHandler. id the ID for the DIME part.

Method Detail

getDataSize

protected long getDataSize()

getDataSize

protected long getDataSize(DataHandler dh)

sendChunk

protected void sendChunk(OutputStream os, byte position, byte[] data, byte chunk)

sendChunk

protected void sendChunk(OutputStream os, byte position, byte[] data, int offset, int length, byte chunk)

sendHeader

protected void sendHeader(OutputStream os, byte position, long length, byte chunk)
Copyright B) 2005 Apache Web Services Project. All Rights Reserved.