Class StreamUtil

java.lang.Object
com.infoteria.asteria.flowlibrary2.stream.StreamUtil

public class StreamUtil extends Object
ユーティリティクラス
  • Constructor Details

    • StreamUtil

      public StreamUtil()
  • Method Details

    • getFileExtension

      public static String getFileExtension(int type)
      引数のストリームタイプに応じた拡張子を返します。
      ストリームタイプ返り値
      Binary, FixedLength, MIME.bin
      Text.txt
      HTML.html
      CSV.csv
      XML, ParameterList, Record.xml
    • getKeyString

      public static String getKeyString()
      For memory get put remove
    • getStreamStr

      public static String getStreamStr(StreamDataObject stream) throws StreamException
      Throws:
      StreamException
    • equalsStreamFactory

      public static boolean equalsStreamFactory(StreamFactory sf1, StreamFactory sf2)
    • equalsString

      public static boolean equalsString(String s1, String s2)
    • equalsLineFeed

      public static boolean equalsLineFeed(LineFeed lf1, LineFeed lf2)
    • equalsFieldDefinition

      public static boolean equalsFieldDefinition(FieldDefinition fd1, FieldDefinition fd2)
    • equalsField

      public static boolean equalsField(Field f1, Field f2)
    • cloneHighCapacityStream

      public static StreamDataObject cloneHighCapacityStream(StreamDataObject stream, String targetLogDirectory, boolean cleanAfterUsage) throws StreamException, IOException, ClassNotFoundException
      Clone High Capacity Stream and its log files. If stream is not a HC-Stream, the passed stream object is returned directly.
      Parameters:
      stream - the stream to be cloned
      targetLogDirectory - the directory to save the cloned log files too
      cleanAfterUsage - true, if the cloned stream and its log files shall be cleaned at the end of the flow, in which it is used
      Returns:
      the cloned stream object for a HC stream or the passed stream directly for a normal stream
      Throws:
      StreamException - if the stream could not be cloned
      IOException - if the stream could not be cloned
      ClassNotFoundException - if the stream could not be cloned