org.bgu.servlet.util
Class MultipartRequest.Part

java.lang.Object
  |
  +--MultipartRequest.Part
Enclosing class:
MultipartRequest

public final class MultipartRequest.Part
extends Object

This class is parts of some multipart


Field Summary
private  String contenttype
           
private  byte[] data
           
private  String filename
           
private  int from
           
private  int to
           
 
Constructor Summary
MultipartRequest.Part(String contenttype, int from, int to)
          Creates a new Part instance that has no file name.
MultipartRequest.Part(String filename, String contenttype, int from, int to)
          Creates a new Part instance that has file name.
 
Method Summary
 String getContentType()
          Gets content type
 byte[] getData()
          Gets binary data of part
 String getFileName()
          Gets file name (if any)
 String getShortFileName()
          Gets only file name (if any)
 boolean isEmpty()
          Checking if part is empty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

filename

private String filename

contenttype

private String contenttype

data

private byte[] data

from

private int from

to

private int to
Constructor Detail

MultipartRequest.Part

public MultipartRequest.Part(String contenttype,
                             int from,
                             int to)
Creates a new Part instance that has no file name.

Parameters:
contenttype - a content-type of part
from - a start index in global data buffer
to - an end index in global data buffer

MultipartRequest.Part

public MultipartRequest.Part(String filename,
                             String contenttype,
                             int from,
                             int to)
Creates a new Part instance that has file name.

Parameters:
filename - a file name
contenttype - a content-type of part
from - a start index in global data buffer
to - an end index in global data buffer
Method Detail

getFileName

public String getFileName()
Gets file name (if any)

Returns:
a String value

getShortFileName

public String getShortFileName()
Gets only file name (if any)

Returns:
a String value

getContentType

public String getContentType()
Gets content type

Returns:
a String value

getData

public byte[] getData()
Gets binary data of part

Returns:
a byte[] value

isEmpty

public boolean isEmpty()
Checking if part is empty

Returns:
a boolean value