jp.terasoluna.fw.file.dao.standard
クラス FileDAOUtility
java.lang.Object
jp.terasoluna.fw.file.dao.standard.FileDAOUtility
public class FileDAOUtility
- extends Object
FileDAO用のユーティリティ。
パディング処理、トリム処理を提供する。
クラス java.lang.Object から継承されたメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileDAOUtility
public FileDAOUtility()
padding
public static String padding(String columnString,
String fileEncoding,
int columnBytes,
char paddingChar,
PaddingType paddingType)
- パディング処理。
カラムの文字列をアノテーションで指定された文字でパディングする。
文字列に追加されるのは、パディング文字「paddingChar」で指定した文字。
パディング文字は半角1文字であるので、全角文字が入力された場合は入力エラーとなる。
- パラメータ:
columnString
- パディング処理前の1カラム分の文字列fileEncoding
- ファイルエンコーディングcolumnBytes
- パディング処理後の1カラムのバイト数paddingChar
- パディング文字paddingType
- パディングタイプ
- 戻り値:
- パディング処理済の1カラム分の文字列
trim
public static String trim(String columnString,
String fileEncoding,
char trimChar,
TrimType trimType)
- トリム処理。
カラムの文字列をアノテーションで指定された文字でトリムする。
文字列から取り除かれるのは、トリム文字「trimChar」で指定した文字。
トリム文字は半角1文字であるので、全角文字が入力された場合は入力エラーとなる。
- パラメータ:
columnString
- トリム処理前の1カラム分の文字列fileEncoding
- ファイルエンコーディングtrimChar
- トリム文字(半角)trimType
- トリムタイプ
- 戻り値:
- トリム処理後の1カラム分の文字列
Copyright © 2011. All Rights Reserved.