package com.kyte.api.util;
import org.apache.commons.httpclient.methods.multipart.PartSource;
import java.io.InputStream;
import java.io.IOException;
/**
*
*/
public class InputStreamPartSource implements PartSource
{
private InputStream inputStream;
private long dataLength;
private String fileName;
public InputStreamPartSource(InputStream inputStream, long dataLength, String fileName)
{
this.inputStream = inputStream;
this.dataLength = dataLength;
this.fileName = fileName;
}
public long getLength()
{
return dataLength;
}
public String getFileName()
{
return fileName;
}
public InputStream createInputStream() throws IOException
{
return inputStream;
}
}
|