|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tobesoft.xplatform.tx.PlatformFileClient
파일으로 데이터(PlatformData)를 저장하고, 파일로부터
데이터(PlatformData)를 적재한다.
다음은 PlatformFileClient을 이용하는 예제이다.
또는String sourcePath = "/home/user/req.xml"; PlatformFileClient source = new PlatformFileClient(sourcePath); source.setSourceContentType(PlatformType.CONTENT_TYPE_XML); PlatformData data = source.receiveData(); source.close(); String targetPath = "/home/user/res.bin"; PlatformFileClient target = new PlatformFileClient(targetPath); target.setTargetContentType(PlatformType.CONTENT_TYPE_BINARY); target.sendData(data); target.close();
String sourcePath = "/home/user/req.xml"; String targetPath = "/home/user/res.bin"; PlatformFileClient client = new PlatformFileClient(sourcePath, targetPath); client.setSourceContentType(PlatformType.CONTENT_TYPE_XML); client.setTargetContentType(PlatformType.CONTENT_TYPE_BINARY); PlatformData data = client.receiveData(); client.sendData(data); client.close();
| Constructor Summary | |
PlatformFileClient(java.io.File file)
입출력 File을 가지는 생성자이다. |
|
PlatformFileClient(java.io.File source,
java.io.File target)
입력(source) File과 출력(target) File을 가지는 생성자이다. |
|
PlatformFileClient(java.io.File source,
java.io.File target,
java.lang.String contentType)
입력(source) File, 출력(target) File과 송수신 형식(contentType)을 가지는 생성자이다. |
|
PlatformFileClient(java.io.File source,
java.io.File target,
java.lang.String contentType,
java.lang.String charset)
입력(source) File, 출력(target) File, 송수신 형식(contentType)과 문자셋(charset)을 가지는 생성자이다. |
|
PlatformFileClient(java.io.File file,
java.lang.String contentType)
입력(source) File과 송수신 형식(contentType)을 가지는 생성자이다. |
|
PlatformFileClient(java.io.File file,
java.lang.String contentType,
java.lang.String charset)
입출력 File, 송수신 형식(contentType)과 문자셋(charset)을 가지는 생성자이다. |
|
PlatformFileClient(java.lang.String path)
입출력 파일의 경로를 가지는 생성자이다. |
|
PlatformFileClient(java.lang.String source,
java.lang.String target)
입력(source) 파일의 경로와 출력(target) 파일의 경로를 가지는 생성자이다. |
|
| Method Summary | |
void |
addProtocolType(java.lang.String protocolType)
프로토콜 형식(protocolType)을 추가한다. |
void |
addSourceProtocolType(java.lang.String protocolType)
입력(source) 프로토콜 형식(protocolType)을 추가한다. |
void |
addTargetProtocolType(java.lang.String protocolType)
출력(target) 프로토콜 형식(protocolType)을 추가한다. |
void |
clearProtocolTypes()
모든 프로토콜 형식(protocolType)을 삭제한다. |
void |
clearSourceProtocolTypes()
모든 입력(source) 프로토콜 형식(protocolType)을 삭제한다. |
void |
clearTargetProtocolTypes()
모든 출력(target) 프로토콜 형식(protocolType)을 삭제한다. |
void |
close()
File 연결을 종료한다. |
boolean |
containsSourceProtocolType(java.lang.String protocolType)
입력(source) 프로토콜 형식(protocolType)의 포함 여부를 검사한다. |
boolean |
containsTargetProtocolType(java.lang.String protocolType)
출력(target) 프로토콜 형식(protocolType)의 포함 여부를 검사한다. |
java.io.File |
getSource()
입력(source) File을 반환한다. |
java.lang.String |
getSourceCharset()
입력(source) 문자셋(charset)을 반환한다. |
java.lang.String |
getSourceContentType()
입력(source) 송수신 형식(contentType)을 반환한다. |
java.lang.String |
getSourceProtocolType(int index)
입력(source) 프로토콜 형식(protocolType)을 반환한다. |
int |
getSourceProtocolTypeCount()
입력(source) 프로토콜 형식(protocolType)의 갯수를 반환한다. |
java.io.File |
getTarget()
출력(target) File을 반환한다. |
java.lang.String |
getTargetCharset()
출력(target) 문자셋(charset)을 반환한다. |
java.lang.String |
getTargetContentType()
출력(target) 송수신 형식(contentType)을 반환한다. |
java.lang.String |
getTargetProtocolType(int index)
출력(target) 프로토콜 형식(protocolType)을 반환한다. |
int |
getTargetProtocolTypeCount()
출력(target) 프로토콜 형식(protocolType)의 갯수를 반환한다. |
boolean |
isVerbose()
INFO 로그의 출력 여부를 검사한다. |
PlatformData |
receiveData()
데이터( PlatformData)를 적재한다.
|
void |
removeProtocolType(java.lang.String protocolType)
프로토콜 형식(protocolType)을 삭제한다. |
void |
removeSourceProtocolType(int index)
입력(source) 프로토콜 형식(protocolType)을 삭제한다. |
void |
removeSourceProtocolType(java.lang.String protocolType)
입력(source) 프로토콜 형식(protocolType)을 삭제한다. |
void |
removeTargetProtocolType(int index)
출력(target) 프로토콜 형식(protocolType)을 삭제한다. |
void |
removeTargetProtocolType(java.lang.String protocolType)
출력(target) 프로토콜 형식(protocolType)을 삭제한다. |
void |
sendData(PlatformData data)
데이터( PlatformData)를 저장한다.
|
void |
setCharset(java.lang.String charset)
입력(source)과 출력(target)의 문자셋(charset)을 반환한다. |
void |
setContentType(java.lang.String contentType)
입력(source)과 출력(target)의 송수신 형식(contentType)을 반환한다. |
void |
setSource(java.io.File source)
입력(source) File을 설정한다. |
void |
setSourceCharset(java.lang.String charset)
입력(source) 문자셋(charset)을 설정한다. |
void |
setSourceContentType(java.lang.String contentType)
입력(source) 송수신 형식(contentType)을 설정한다. |
void |
setTarget(java.io.File target)
출력(target) File을 설정한다. |
void |
setTargetCharset(java.lang.String charset)
출력(target) 문자셋(charset)을 설정한다. |
void |
setTargetContentType(java.lang.String contentType)
출력(target) 송수신 형식(contentType)을 설정한다. |
void |
setVerbose(boolean verbose)
INFO 로그의 출력 여부를 설정한다. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PlatformFileClient(java.lang.String path)
path - 입출력 파일의 경로
public PlatformFileClient(java.lang.String source,
java.lang.String target)
source - 입력(source) 파일의 경로target - 출력(target) 파일의 경로public PlatformFileClient(java.io.File file)
File을 가지는 생성자이다.
file - 입출력 File
public PlatformFileClient(java.io.File file,
java.lang.String contentType)
File과 송수신 형식(contentType)을 가지는 생성자이다.
public PlatformFileClient(java.io.File file,
java.lang.String contentType,
java.lang.String charset)
File, 송수신 형식(contentType)과 문자셋(charset)을 가지는 생성자이다.
public PlatformFileClient(java.io.File source,
java.io.File target)
File과 출력(target) File을 가지는 생성자이다.
public PlatformFileClient(java.io.File source,
java.io.File target,
java.lang.String contentType)
File, 출력(target) File과 송수신 형식(contentType)을 가지는 생성자이다.
public PlatformFileClient(java.io.File source,
java.io.File target,
java.lang.String contentType,
java.lang.String charset)
File, 출력(target) File, 송수신 형식(contentType)과 문자셋(charset)을 가지는 생성자이다.
| Method Detail |
public java.io.File getSource()
File을 반환한다.
public void setSource(java.io.File source)
File을 설정한다.
public java.io.File getTarget()
File을 반환한다.
public void setTarget(java.io.File target)
File을 설정한다.
public void setContentType(java.lang.String contentType)
public java.lang.String getSourceContentType()
public void setSourceContentType(java.lang.String contentType)
public java.lang.String getTargetContentType()
public void setTargetContentType(java.lang.String contentType)
public void setCharset(java.lang.String charset)
public java.lang.String getSourceCharset()
public void setSourceCharset(java.lang.String charset)
public java.lang.String getTargetCharset()
public void setTargetCharset(java.lang.String charset)
public void addProtocolType(java.lang.String protocolType)
protocolType - 프로토콜 형식
java.lang.IllegalArgumentException - 프로토콜 형식(protocolType) 중복 추가시PlatformType.PROTOCOL_TYPE_ZLIBpublic void removeProtocolType(java.lang.String protocolType)
protocolType - 프로토콜 형식public void clearProtocolTypes()
public java.lang.String getSourceProtocolType(int index)
index - 위치PlatformType.PROTOCOL_TYPE_ZLIBpublic void addSourceProtocolType(java.lang.String protocolType)
protocolType - 프로토콜 형식
java.lang.IllegalArgumentException - 프로토콜 형식(protocolType) 중복 추가시PlatformType.PROTOCOL_TYPE_ZLIBpublic void removeSourceProtocolType(int index)
index - 위치public void removeSourceProtocolType(java.lang.String protocolType)
protocolType - 프로토콜 형식public boolean containsSourceProtocolType(java.lang.String protocolType)
protocolType - 프로토콜 형식
public void clearSourceProtocolTypes()
public int getSourceProtocolTypeCount()
public java.lang.String getTargetProtocolType(int index)
index - 위치PlatformType.PROTOCOL_TYPE_ZLIBpublic void addTargetProtocolType(java.lang.String protocolType)
protocolType - 프로토콜 형식
java.lang.IllegalArgumentException - 프로토콜 형식(protocolType) 중복 추가시PlatformType.PROTOCOL_TYPE_ZLIBpublic void removeTargetProtocolType(int index)
index - 위치public void removeTargetProtocolType(java.lang.String protocolType)
protocolType - 프로토콜 형식public boolean containsTargetProtocolType(java.lang.String protocolType)
protocolType - 프로토콜 형식
public void clearTargetProtocolTypes()
public int getTargetProtocolTypeCount()
public boolean isVerbose()
verbose가 "true" 인
경우에만 로그가 출력된다.
setVerbose(boolean)public void setVerbose(boolean verbose)
verbose - INFO 로그의 출력 여부isVerbose()
public void sendData(PlatformData data)
throws PlatformException
PlatformData)를 저장한다.
송수신 형식(contentType)이 설정되지 않은 경우 PlatformType.DEFAULT_CONTENT_TYPE이 적용된다.
PlatformException
public PlatformData receiveData()
throws PlatformException
PlatformData)를 적재한다.
송수신 형식(contentType)이 설정되지 않은 경우 PlatformType.DEFAULT_CONTENT_TYPE이 적용된다.
PlatformExceptionpublic void close()
File 연결을 종료한다.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||