org.codelabor.system.mime.service
Class TikaMimeDetectServiceImpl

java.lang.Object
  extended by org.codelabor.system.mime.service.TikaMimeDetectServiceImpl
All Implemented Interfaces:
MimeDetectService

public class TikaMimeDetectServiceImpl
extends Object
implements MimeDetectService

마임타입 탐지 서비스 구현 클래스
Apache Tika를 활용한 구현 클래스

Author:
Shin Sangjae

Constructor Summary
TikaMimeDetectServiceImpl()
           
 
Method Summary
 String getMimeType(byte[] byteArray)
          마임타입을 가져온다.
 String getMimeType(File file)
          마임타입을 가져온다.
 String getMimeType(InputStream inputStream)
          마임타입을 가져온다.
 String getMimeType(String path)
          마임타입을 가져온다.
 String getMimeType(URL url)
          마임타입을 가져온다.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TikaMimeDetectServiceImpl

public TikaMimeDetectServiceImpl()
Method Detail

getMimeType

public String getMimeType(InputStream inputStream)
                   throws Exception
Description copied from interface: MimeDetectService
마임타입을 가져온다.

Specified by:
getMimeType in interface MimeDetectService
Parameters:
inputStream - 입력 스트림
Returns:
마임타입
Throws:
Exception

getMimeType

public String getMimeType(File file)
                   throws Exception
Description copied from interface: MimeDetectService
마임타입을 가져온다.

Specified by:
getMimeType in interface MimeDetectService
Parameters:
file - 파일
Returns:
마임타입
Throws:
Exception

getMimeType

public String getMimeType(URL url)
                   throws Exception
Description copied from interface: MimeDetectService
마임타입을 가져온다.

Specified by:
getMimeType in interface MimeDetectService
Parameters:
url - URL
Returns:
마임타입
Throws:
Exception

getMimeType

public String getMimeType(byte[] byteArray)
                   throws Exception
Description copied from interface: MimeDetectService
마임타입을 가져온다.

Specified by:
getMimeType in interface MimeDetectService
Parameters:
byteArray - 바이트 배열
Returns:
마임타입
Throws:
Exception

getMimeType

public String getMimeType(String path)
                   throws Exception
Description copied from interface: MimeDetectService
마임타입을 가져온다.

Specified by:
getMimeType in interface MimeDetectService
Parameters:
path - 파일 경로
Returns:
마임타입
Throws:
Exception


Copyright © 2011 CODELABOR. All Rights Reserved.