Kagetaka

net.hizlab.kagetaka.util
クラス StringUtils

java.lang.Object
  拡張net.hizlab.kagetaka.util.StringUtils

public class StringUtils
extends Object

文字列に対する操作を行うクラスです。

バージョン:
$Revision: 1.4 $

メソッドの概要
static String getFile(String path)
          URL 形式のパスからファイル名を抜き出します。
static String getFile(URL url)
          URL からファイル名を抜き出します。
static String replace(String value, String oldString, String newString)
          この文字列を文字列で置き換えます。
static URL toURL(String text)
          指定した文字列を URL に変換します。
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

メソッドの詳細

getFile

public static String getFile(String path)
URL 形式のパスからファイル名を抜き出します。

パラメータ:
path - URL 形式のパス(相対パスも可)
戻り値:
ファイル名

getFile

public static String getFile(URL url)
URL からファイル名を抜き出します。

パラメータ:
url - URL
戻り値:
ファイル名

replace

public static String replace(String value,
                             String oldString,
                             String newString)
この文字列を文字列で置き換えます。

パラメータ:
value - 変換する対象の文字列
oldString - 以前の文字列
newString - 新しい文字列
戻り値:
変換された文字列

toURL

public static URL toURL(String text)
                 throws MalformedURLException
指定した文字列を URL に変換します。

パラメータ:
text - 文字列
戻り値:
URL、変換できなかった場合は null
例外:
MalformedURLException - URL に変換できなかった場合

Kagetaka

Copyright (c) 2002-2003 The Kagetaka Project 'September 12, 2003'