|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectkr.co.hit.live.web.upload.FormFile
public class FormFile
| Field Summary | |
|---|---|
protected static org.slf4j.Logger |
logger
|
| Constructor Summary | |
|---|---|
FormFile(org.apache.commons.fileupload.FileItem fileItem)
FormFile 클래스의 생성자로써 FileItem 객체를 저장한다. |
|
| Method Summary | |
|---|---|
void |
destroy()
파일을 삭제한다. |
protected String |
getBaseFileName(String filePath)
경로명을 제외한 파일명을 리턴한다. |
String |
getContentType()
업로드 파일에 대한 컨텐트 타입을 리턴한다. |
String |
getFieldName()
리퀘스트로부터 업로드 파일을 식별하기 위한 키를 리턴한다. |
byte[] |
getFileData()
파일의 내용을 byte[] 형태로 리턴한다. |
String |
getFileName()
파일의 이름을 리턴한다. |
int |
getFileSize()
파일의 사이즈를 리턴한다. |
InputStream |
getInputStream()
파일의 내용을 InputStream 형태로 리턴한다. |
String |
toString()
파일 명을 리턴한다. |
void |
write(File file)
지정한 파일객체로 파일 내용을 저장한다. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static org.slf4j.Logger logger
| Constructor Detail |
|---|
public FormFile(org.apache.commons.fileupload.FileItem fileItem)
FormFile 클래스의 생성자로써 FileItem 객체를 저장한다.
fileItem - 파일 업로드 리퀘스트로부터 얻어지는 FileItem 객체key - FileItem 객체에 대한 키 값| Method Detail |
|---|
public String getContentType()
업로드 파일에 대한 컨텐트 타입을 리턴한다.
public int getFileSize()
파일의 사이즈를 리턴한다.
public String getFileName()
파일의 이름을 리턴한다.
public byte[] getFileData()
throws FileNotFoundException,
IOException
파일의 내용을 byte[] 형태로 리턴한다.
FileNotFoundException - 해당 파일을 찾지 못하는 경우
IOException - 해당 파일로 부터 내용을 읽지 못하는 경우
public InputStream getInputStream()
throws FileNotFoundException,
IOException
파일의 내용을 InputStream 형태로 리턴한다.
FileNotFoundException - 해당 파일을 찾지 못하는 경우
IOException - 해당 파일로 부터 내용을 읽지 못하는 경우public void destroy()
파일을 삭제한다.
public String getFieldName()
리퀘스트로부터 업로드 파일을 식별하기 위한 키를 리턴한다.
public String toString()
파일 명을 리턴한다.
toString in class Object
public void write(File file)
throws Exception
file -
Exceptionprotected String getBaseFileName(String filePath)
경로명을 제외한 파일명을 리턴한다.
filePath - 파일의 전체 경로명
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||