com.clickntap.tool.types
Class LocalFile

java.lang.Object
  extended by com.clickntap.tool.types.LocalFile
All Implemented Interfaces:
org.springframework.web.multipart.MultipartFile

public class LocalFile
extends Object
implements org.springframework.web.multipart.MultipartFile


Constructor Summary
LocalFile(String name, String contentType, File file)
           
LocalFile(String name, String contentType, InputStream inputStream)
           
 
Method Summary
 byte[] getBytes()
           
 String getContentType()
           
 InputStream getInputStream()
           
 String getName()
           
 String getOriginalFilename()
           
 long getSize()
           
 boolean isEmpty()
           
 void transferTo(File dest)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalFile

public LocalFile(String name,
                 String contentType,
                 InputStream inputStream)

LocalFile

public LocalFile(String name,
                 String contentType,
                 File file)
Method Detail

getBytes

public byte[] getBytes()
                throws IOException
Specified by:
getBytes in interface org.springframework.web.multipart.MultipartFile
Throws:
IOException

getContentType

public String getContentType()
Specified by:
getContentType in interface org.springframework.web.multipart.MultipartFile

getInputStream

public InputStream getInputStream()
                           throws IOException
Specified by:
getInputStream in interface org.springframework.web.multipart.MultipartFile
Throws:
IOException

getName

public String getName()
Specified by:
getName in interface org.springframework.web.multipart.MultipartFile

getOriginalFilename

public String getOriginalFilename()
Specified by:
getOriginalFilename in interface org.springframework.web.multipart.MultipartFile

getSize

public long getSize()
Specified by:
getSize in interface org.springframework.web.multipart.MultipartFile

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface org.springframework.web.multipart.MultipartFile

transferTo

public void transferTo(File dest)
                throws IOException,
                       IllegalStateException
Specified by:
transferTo in interface org.springframework.web.multipart.MultipartFile
Throws:
IOException
IllegalStateException


Copyright © 2014. All rights reserved.