blob: bcd594e59b1b73cb0f030693f963b9a3c2c9b563 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.4.2_08) on Sat Apr 22 18:56:43 PDT 2006 -->
<TITLE>
ManagedMemoryDataSource (Axis API)
</TITLE>
<META NAME="keywords" CONTENT="org.apache.axis.attachments.ManagedMemoryDataSource class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="ManagedMemoryDataSource (Axis API)";
}
</SCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ManagedMemoryDataSource.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/apache/axis/attachments/IncomingAttachmentStreams.IncomingAttachmentInputStream.html" title="class in org.apache.axis.attachments"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/axis/attachments/MimeMultipartDataSource.html" title="class in org.apache.axis.attachments"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="ManagedMemoryDataSource.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.axis.attachments</FONT>
<BR>
Class ManagedMemoryDataSource</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by"><B>org.apache.axis.attachments.ManagedMemoryDataSource</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD>javax.activation.DataSource</DD>
</DL>
<HR>
<DL>
<DT>public class <B>ManagedMemoryDataSource</B><DT>extends java.lang.Object<DT>implements javax.activation.DataSource</DL>
<P>
This class allows small attachments to be cached in memory, while large ones are
cached out. It implements a Java Activiation Data source interface.
<P>
<P>
<DL>
<DT><B>Author:</B></DT>
<DD>Rick Rineholt</DD>
</DL>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Field Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.io.BufferedOutputStream</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/attachments/ManagedMemoryDataSource.html#cachediskstream">cachediskstream</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is the cached disk stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/attachments/ManagedMemoryDataSource.html#closed">closed</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If true the source input stream is now closed.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/attachments/ManagedMemoryDataSource.html#contentType">contentType</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The content type.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/attachments/ManagedMemoryDataSource.html#currentMemoryBuf">currentMemoryBuf</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hold the last memory buffer.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/attachments/ManagedMemoryDataSource.html#currentMemoryBufSz">currentMemoryBufSz</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The number of bytes written to the above buffer.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/attachments/ManagedMemoryDataSource.html#debugEnabled">debugEnabled</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Field debugEnabled</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/attachments/ManagedMemoryDataSource.html#deleted">deleted</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Flag to show if the resources behind this have been deleted.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.io.File</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/attachments/ManagedMemoryDataSource.html#diskCacheFile">diskCacheFile</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Field diskCacheFile</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;org.apache.commons.logging.Log</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/attachments/ManagedMemoryDataSource.html#is_log">is_log</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Field is_log</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;org.apache.commons.logging.Log</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/attachments/ManagedMemoryDataSource.html#log">log</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Field log</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/attachments/ManagedMemoryDataSource.html#MAX_MEMORY_DISK_CACHED">MAX_MEMORY_DISK_CACHED</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Field MAX_MEMORY_DISK_CACHED</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/attachments/ManagedMemoryDataSource.html#maxCached">maxCached</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Field maxCached</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.util.LinkedList</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/attachments/ManagedMemoryDataSource.html#memorybuflist">memorybuflist</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The linked list to hold the in memory buffers.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/attachments/ManagedMemoryDataSource.html#MIN_MEMORY_DISK_CACHED">MIN_MEMORY_DISK_CACHED</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Field MIN_MEMORY_DISK_CACHED</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/attachments/ManagedMemoryDataSource.html#READ_CHUNK_SZ">READ_CHUNK_SZ</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Field READ_CHUNK_SZ</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.util.WeakHashMap</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/attachments/ManagedMemoryDataSource.html#readers">readers</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Field readers</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/attachments/ManagedMemoryDataSource.html#totalsz">totalsz</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The total size in bytes in this data source.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected </CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/attachments/ManagedMemoryDataSource.html#ManagedMemoryDataSource()">ManagedMemoryDataSource</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor ManagedMemoryDataSource.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/attachments/ManagedMemoryDataSource.html#ManagedMemoryDataSource(java.io.InputStream, int, java.lang.String)">ManagedMemoryDataSource</A></B>(java.io.InputStream&nbsp;ss,
int&nbsp;maxCached,
java.lang.String&nbsp;contentType)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new boundary stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/attachments/ManagedMemoryDataSource.html#ManagedMemoryDataSource(java.io.InputStream, int, java.lang.String, boolean)">ManagedMemoryDataSource</A></B>(java.io.InputStream&nbsp;ss,
int&nbsp;maxCached,
java.lang.String&nbsp;contentType,
boolean&nbsp;readall)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new boundary stream.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/attachments/ManagedMemoryDataSource.html#close()">close</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method is a low level write.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/attachments/ManagedMemoryDataSource.html#delete()">delete</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/attachments/ManagedMemoryDataSource.html#finalize()">finalize</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/attachments/ManagedMemoryDataSource.html#flushToDisk()">flushToDisk</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Routine to flush data to disk if is in memory.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/attachments/ManagedMemoryDataSource.html#getContentType()">getContentType</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method returns the MIME type of the data in the form of a string.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.io.File</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/attachments/ManagedMemoryDataSource.html#getDiskCacheFile()">getDiskCacheFile</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;get the filename of the content if it is cached to disk.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.io.InputStream</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/attachments/ManagedMemoryDataSource.html#getInputStream()">getInputStream</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method returns an InputStream representing the the data and throws the appropriate exception if it can not do so.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/attachments/ManagedMemoryDataSource.html#getName()">getName</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This will flush any memory source to disk and
provide the name of the file if desired.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.io.OutputStream</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/attachments/ManagedMemoryDataSource.html#getOutputStream()">getOutputStream</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method returns an OutputStream where the data can be written and
throws the appropriate exception if it can not do so.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/attachments/ManagedMemoryDataSource.html#main(java.lang.String[])">main</A></B>(java.lang.String[]&nbsp;arg)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Method main</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/attachments/ManagedMemoryDataSource.html#write(byte[])">write</A></B>(byte[]&nbsp;data)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Write bytes to the stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/axis/attachments/ManagedMemoryDataSource.html#write(byte[], int)">write</A></B>(byte[]&nbsp;data,
int&nbsp;length)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method is a low level write.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="log"><!-- --></A><H3>
log</H3>
<PRE>
protected static org.apache.commons.logging.Log <B>log</B></PRE>
<DL>
<DD>Field log
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="contentType"><!-- --></A><H3>
contentType</H3>
<PRE>
protected java.lang.String <B>contentType</B></PRE>
<DL>
<DD>The content type. This defaults to
<code>application/octet-stream</code>.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="MIN_MEMORY_DISK_CACHED"><!-- --></A><H3>
MIN_MEMORY_DISK_CACHED</H3>
<PRE>
public static final int <B>MIN_MEMORY_DISK_CACHED</B></PRE>
<DL>
<DD>Field MIN_MEMORY_DISK_CACHED
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.axis.attachments.ManagedMemoryDataSource.MIN_MEMORY_DISK_CACHED">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="MAX_MEMORY_DISK_CACHED"><!-- --></A><H3>
MAX_MEMORY_DISK_CACHED</H3>
<PRE>
public static final int <B>MAX_MEMORY_DISK_CACHED</B></PRE>
<DL>
<DD>Field MAX_MEMORY_DISK_CACHED
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.axis.attachments.ManagedMemoryDataSource.MAX_MEMORY_DISK_CACHED">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="maxCached"><!-- --></A><H3>
maxCached</H3>
<PRE>
protected int <B>maxCached</B></PRE>
<DL>
<DD>Field maxCached
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="diskCacheFile"><!-- --></A><H3>
diskCacheFile</H3>
<PRE>
protected java.io.File <B>diskCacheFile</B></PRE>
<DL>
<DD>Field diskCacheFile
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="readers"><!-- --></A><H3>
readers</H3>
<PRE>
protected java.util.WeakHashMap <B>readers</B></PRE>
<DL>
<DD>Field readers
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="deleted"><!-- --></A><H3>
deleted</H3>
<PRE>
protected boolean <B>deleted</B></PRE>
<DL>
<DD>Flag to show if the resources behind this have been deleted.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="READ_CHUNK_SZ"><!-- --></A><H3>
READ_CHUNK_SZ</H3>
<PRE>
public static final int <B>READ_CHUNK_SZ</B></PRE>
<DL>
<DD>Field READ_CHUNK_SZ
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.axis.attachments.ManagedMemoryDataSource.READ_CHUNK_SZ">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="debugEnabled"><!-- --></A><H3>
debugEnabled</H3>
<PRE>
protected boolean <B>debugEnabled</B></PRE>
<DL>
<DD>Field debugEnabled
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="memorybuflist"><!-- --></A><H3>
memorybuflist</H3>
<PRE>
protected java.util.LinkedList <B>memorybuflist</B></PRE>
<DL>
<DD>The linked list to hold the in memory buffers.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="currentMemoryBuf"><!-- --></A><H3>
currentMemoryBuf</H3>
<PRE>
protected byte[] <B>currentMemoryBuf</B></PRE>
<DL>
<DD>Hold the last memory buffer.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="currentMemoryBufSz"><!-- --></A><H3>
currentMemoryBufSz</H3>
<PRE>
protected int <B>currentMemoryBufSz</B></PRE>
<DL>
<DD>The number of bytes written to the above buffer.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="totalsz"><!-- --></A><H3>
totalsz</H3>
<PRE>
protected long <B>totalsz</B></PRE>
<DL>
<DD>The total size in bytes in this data source.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="cachediskstream"><!-- --></A><H3>
cachediskstream</H3>
<PRE>
protected java.io.BufferedOutputStream <B>cachediskstream</B></PRE>
<DL>
<DD>This is the cached disk stream.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="closed"><!-- --></A><H3>
closed</H3>
<PRE>
protected boolean <B>closed</B></PRE>
<DL>
<DD>If true the source input stream is now closed.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="is_log"><!-- --></A><H3>
is_log</H3>
<PRE>
protected static org.apache.commons.logging.Log <B>is_log</B></PRE>
<DL>
<DD>Field is_log
<P>
<DL>
</DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="ManagedMemoryDataSource()"><!-- --></A><H3>
ManagedMemoryDataSource</H3>
<PRE>
protected <B>ManagedMemoryDataSource</B>()</PRE>
<DL>
<DD>Constructor ManagedMemoryDataSource.
<P>
</DL>
<HR>
<A NAME="ManagedMemoryDataSource(java.io.InputStream, int, java.lang.String)"><!-- --></A><H3>
ManagedMemoryDataSource</H3>
<PRE>
public <B>ManagedMemoryDataSource</B>(java.io.InputStream&nbsp;ss,
int&nbsp;maxCached,
java.lang.String&nbsp;contentType)
throws java.io.IOException</PRE>
<DL>
<DD>Create a new boundary stream.
<P>
<DT><B>Parameters:</B><DD><CODE>ss</CODE> - is the source input stream that is used to create this data source.<DD><CODE>maxCached</CODE> - This is the max memory that is to be used to cache the data.<DD><CODE>contentType</CODE> - the mime type for this data stream.
by buffering you can some effiency in searching.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
<HR>
<A NAME="ManagedMemoryDataSource(java.io.InputStream, int, java.lang.String, boolean)"><!-- --></A><H3>
ManagedMemoryDataSource</H3>
<PRE>
public <B>ManagedMemoryDataSource</B>(java.io.InputStream&nbsp;ss,
int&nbsp;maxCached,
java.lang.String&nbsp;contentType,
boolean&nbsp;readall)
throws java.io.IOException</PRE>
<DL>
<DD>Create a new boundary stream.
<P>
<DT><B>Parameters:</B><DD><CODE>ss</CODE> - is the source input stream that is used to create this data source.<DD><CODE>maxCached</CODE> - This is the max memory that is to be used to cache the data.<DD><CODE>contentType</CODE> - the mime type for this data stream.
by buffering you can some effiency in searching.<DD><CODE>readall</CODE> - if true will read in the whole source.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="getContentType()"><!-- --></A><H3>
getContentType</H3>
<PRE>
public java.lang.String <B>getContentType</B>()</PRE>
<DL>
<DD>This method returns the MIME type of the data in the form of a string.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>getContentType</CODE> in interface <CODE>javax.activation.DataSource</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>The mime type.</DL>
</DD>
</DL>
<HR>
<A NAME="getInputStream()"><!-- --></A><H3>
getInputStream</H3>
<PRE>
public java.io.InputStream <B>getInputStream</B>()
throws java.io.IOException</PRE>
<DL>
<DD>This method returns an InputStream representing the the data and throws the appropriate exception if it can not do so.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>getInputStream</CODE> in interface <CODE>javax.activation.DataSource</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the java.io.InputStream for the data source.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="getName()"><!-- --></A><H3>
getName</H3>
<PRE>
public java.lang.String <B>getName</B>()</PRE>
<DL>
<DD>This will flush any memory source to disk and
provide the name of the file if desired.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>getName</CODE> in interface <CODE>javax.activation.DataSource</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the name of the file of the stream</DL>
</DD>
</DL>
<HR>
<A NAME="getOutputStream()"><!-- --></A><H3>
getOutputStream</H3>
<PRE>
public java.io.OutputStream <B>getOutputStream</B>()
throws java.io.IOException</PRE>
<DL>
<DD>This method returns an OutputStream where the data can be written and
throws the appropriate exception if it can not do so.
NOT SUPPORTED, not need for axis, data sources are create by constructors.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>getOutputStream</CODE> in interface <CODE>javax.activation.DataSource</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>always <code>null</code>
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="write(byte[])"><!-- --></A><H3>
write</H3>
<PRE>
protected void <B>write</B>(byte[]&nbsp;data)
throws java.io.IOException</PRE>
<DL>
<DD>Write bytes to the stream.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>data</CODE> - all bytes of this array are written to the stream
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if there was a problem writing the data</DL>
</DD>
</DL>
<HR>
<A NAME="write(byte[], int)"><!-- --></A><H3>
write</H3>
<PRE>
protected void <B>write</B>(byte[]&nbsp;data,
int&nbsp;length)
throws java.io.IOException</PRE>
<DL>
<DD>This method is a low level write.
Note it is designed to in the future to allow streaming to both memory
AND to disk simultaneously.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>data</CODE> - <DD><CODE>length</CODE> -
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="close()"><!-- --></A><H3>
close</H3>
<PRE>
protected void <B>close</B>()
throws java.io.IOException</PRE>
<DL>
<DD>This method is a low level write.
Close the stream.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="finalize()"><!-- --></A><H3>
finalize</H3>
<PRE>
protected void <B>finalize</B>()
throws java.lang.Throwable</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>java.lang.Throwable</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="flushToDisk()"><!-- --></A><H3>
flushToDisk</H3>
<PRE>
protected void <B>flushToDisk</B>()
throws java.io.IOException,
java.io.FileNotFoundException</PRE>
<DL>
<DD>Routine to flush data to disk if is in memory.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE>
<DD><CODE>java.io.FileNotFoundException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="delete()"><!-- --></A><H3>
delete</H3>
<PRE>
public boolean <B>delete</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="main(java.lang.String[])"><!-- --></A><H3>
main</H3>
<PRE>
public static void <B>main</B>(java.lang.String[]&nbsp;arg)</PRE>
<DL>
<DD>Method main
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>arg</CODE> - </DL>
</DD>
</DL>
<HR>
<A NAME="getDiskCacheFile()"><!-- --></A><H3>
getDiskCacheFile</H3>
<PRE>
public java.io.File <B>getDiskCacheFile</B>()</PRE>
<DL>
<DD>get the filename of the content if it is cached to disk.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>file object pointing to file, or null for memory-stored content</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ManagedMemoryDataSource.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/apache/axis/attachments/IncomingAttachmentStreams.IncomingAttachmentInputStream.html" title="class in org.apache.axis.attachments"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/axis/attachments/MimeMultipartDataSource.html" title="class in org.apache.axis.attachments"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="ManagedMemoryDataSource.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright © 2005 Apache Web Services Project. All Rights Reserved.
</BODY>
</HTML>