jp.go.aist.dmrc.platform.beans.io
クラス PFBinaryFileWriter

java.lang.Object
  上位を拡張 jp.go.aist.dmrc.platform.beans.io.PFWriter
      上位を拡張 jp.go.aist.dmrc.platform.beans.io.PFBinaryFileWriter
すべての実装されたインタフェース:
java.io.Serializable, PFComponent, PFXMLSerializable

public class PFBinaryFileWriter
extends PFWriter
implements PFXMLSerializable

バイナリデータをファイルに書き出すコンポーネント。

このコンポーネントからはイベントが発生しない。

関連項目:
直列化された形式

コンストラクタの概要
PFBinaryFileWriter()
          デフォルトコンストラクタ
 
メソッドの概要
 void close()
          ファイルを閉じる
 java.lang.String getComponentName()
          コンポーネント名称を取得する。
 boolean isLittleEndian()
          下位ビットが先にバイト列に書きこまれる(リトルエンディアン)かどうかを取得する。
 boolean isOpen()
          ファイルを開いているか判定する
 void localeUpdated()
          ロケール変更に対応する。
 void open(java.io.File file)
          ファイルオブジェクトを指定してファイルを開く
 void open(java.lang.String filename)
          ファイル名を指定してファイルを開く
 void readXML(PFXMLLoader in)
          コンポーネントのXML入力.
 void setLittleEndian(boolean flag)
          下位ビットが先にバイト列に書きこまれる(リトルエンディアン)かどうかを設定する。
 void writeBoolean(boolean value)
          booleanの値を1バイトデータとして書き込む。
 void writeByte(byte value)
          byteの値を1バイトデータとして書き込む。
 void writeChar(char value)
          charの値を2バイトデータとして書き込む。
 void writeDouble(double value)
          doubleの値を8バイトデータとして書き込む。
 void writeFloat(float value)
          floatの値を4バイトデータとして書き込む。
 void writeInt(int value)
          intの値を4バイトデータとして書き込む。
 void writeLong(long value)
          longの値を8バイトデータとして書き込む。
 void writeShort(short value)
          shortの値を2バイトデータとして書き込む。
 void writeString(java.lang.String text)
          文字列の各文字を2バイトデータとして書き込む。
 void writeString(java.lang.String text, int length)
          書き込む数を指定して文字列の各文字を2バイトデータとして書き込む。
 void writeStringAsSingleByteChar(java.lang.String text)
          文字列の各文字を1バイトデータとして書き込む。
 void writeStringAsSingleByteChar(java.lang.String text, int length)
          書き込む数を指定して文字列の各文字を1バイトデータとして書き込む。
 void writeXML(PFXMLGenerator out)
          コンポーネントのXML出力.
 
クラス jp.go.aist.dmrc.platform.beans.io.PFWriter から継承されたメソッド
getComponentID, getComponentKey, getComponentKeys, getComponentPublicName, getComponentString, getCurrentFile, getExceptionIgnoring, getFile, isAllowPullTransfer, isAllowPushTransfer, isAllowRemoteInvocation, setAllowPullTransfer, setAllowPushTransfer, setAllowRemoteInvocation, setComponentID, setComponentKey, setComponentKeys, setComponentPublicName, setExceptionIgnoring, setFile, setFile
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

PFBinaryFileWriter

public PFBinaryFileWriter()
デフォルトコンストラクタ

メソッドの詳細

getComponentName

public java.lang.String getComponentName()
コンポーネント名称を取得する。

定義:
インタフェース PFComponent 内の getComponentName
戻り値:
コンポーネント名
関連項目:
PFComponent.getComponentName()

localeUpdated

public void localeUpdated()
ロケール変更に対応する。

定義:
インタフェース PFComponent 内の localeUpdated
オーバーライド:
クラス PFWriter 内の localeUpdated
関連項目:
PFComponent.localeUpdated()

readXML

public void readXML(PFXMLLoader in)
コンポーネントのXML入力.

定義:
インタフェース PFXMLSerializable 内の readXML
パラメータ:
in - XML入力ユーティリティ

writeXML

public void writeXML(PFXMLGenerator out)
              throws java.io.IOException
コンポーネントのXML出力.

定義:
インタフェース PFXMLSerializable 内の writeXML
パラメータ:
out - XML出力ユーティリティ
例外:
java.io.IOException

open

public void open(java.lang.String filename)
          throws PFComponentException
ファイル名を指定してファイルを開く

パラメータ:
filename - ファイル名
例外:
PFComponentException - ファイルオープンの失敗

open

public void open(java.io.File file)
          throws PFComponentException
ファイルオブジェクトを指定してファイルを開く

パラメータ:
file - ファイルオブジェクト
例外:
PFComponentException - ファイルオープンの失敗

close

public void close()
           throws PFComponentException
ファイルを閉じる

例外:
PFComponentException - ファイルクローズの失敗

isOpen

public boolean isOpen()
ファイルを開いているか判定する

戻り値:
真偽値

isLittleEndian

public boolean isLittleEndian()
下位ビットが先にバイト列に書きこまれる(リトルエンディアン)かどうかを取得する。

戻り値:
下位ビットが先かどうかのフラグ

setLittleEndian

public void setLittleEndian(boolean flag)
下位ビットが先にバイト列に書きこまれる(リトルエンディアン)かどうかを設定する。

パラメータ:
flag - 下位ビットが先かどうかのフラグ

writeBoolean

public void writeBoolean(boolean value)
                  throws PFComponentException
booleanの値を1バイトデータとして書き込む。

パラメータ:
value - booleanの値
例外:
PFComponentException - 書き込み失敗

writeByte

public void writeByte(byte value)
               throws PFComponentException
byteの値を1バイトデータとして書き込む。

パラメータ:
value - byteの値
例外:
PFComponentException - 書き込み失敗

writeShort

public void writeShort(short value)
                throws PFComponentException
shortの値を2バイトデータとして書き込む。

パラメータ:
value - shortの値
例外:
PFComponentException - 書き込み失敗

writeInt

public void writeInt(int value)
              throws PFComponentException
intの値を4バイトデータとして書き込む。

パラメータ:
value - intの値
例外:
PFComponentException - 書き込み失敗

writeLong

public void writeLong(long value)
               throws PFComponentException
longの値を8バイトデータとして書き込む。

パラメータ:
value - longの値
例外:
PFComponentException - 書き込み失敗

writeChar

public void writeChar(char value)
               throws PFComponentException
charの値を2バイトデータとして書き込む。

パラメータ:
value - charの値
例外:
PFComponentException - 書き込み失敗

writeFloat

public void writeFloat(float value)
                throws PFComponentException
floatの値を4バイトデータとして書き込む。

パラメータ:
value - floatの値
例外:
PFComponentException - 書き込み失敗

writeDouble

public void writeDouble(double value)
                 throws PFComponentException
doubleの値を8バイトデータとして書き込む。

パラメータ:
value - doubleの値
例外:
PFComponentException - 書き込み失敗

writeString

public void writeString(java.lang.String text)
                 throws PFComponentException
文字列の各文字を2バイトデータとして書き込む。

パラメータ:
text - 文字列
例外:
PFComponentException - 書き込み失敗

writeString

public void writeString(java.lang.String text,
                        int length)
                 throws PFComponentException
書き込む数を指定して文字列の各文字を2バイトデータとして書き込む。 文字列の長さより少ない数を指定した場合はその長さ分だけ書き込み、 文字列の長さより多い数を指定した場合は空白で埋めて書き込む。

パラメータ:
text - 文字列
length - 書き込むバイト数
例外:
PFComponentException - 書き込み失敗

writeStringAsSingleByteChar

public void writeStringAsSingleByteChar(java.lang.String text)
                                 throws PFComponentException
文字列の各文字を1バイトデータとして書き込む。

パラメータ:
text - 文字列
例外:
PFComponentException - 書き込み失敗

writeStringAsSingleByteChar

public void writeStringAsSingleByteChar(java.lang.String text,
                                        int length)
                                 throws PFComponentException
書き込む数を指定して文字列の各文字を1バイトデータとして書き込む。 文字列の長さより少ない数を指定した場合はその長さ分だけ書き込み、 文字列の長さより多い数を指定した場合は空白で埋めて書き込む。

パラメータ:
text - 文字列
length - 書き込むバイト数
例外:
PFComponentException - 書き込み失敗