?? normalizezenkakureader.java
字號:
/**
* IgaLib -> String
* Copyright (C) 2001 Tosiki IGA , IgaLib project member
* (http://homepage2.nifty.com/igat/igapyon/index.html)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package jp.ne.nifty.iga.tosiki.string;
import java.io.*;
/**
* 慡妏傪揔惓壔偟偰撉傒崬傓Reader僋儔僗偱偡丅敿妏僇僞僇僫偼慡妏壔偟慡妏塸悢偼敿妏壔偟傑偡<BR>
*
* 偙偺僋儔僗傪棙梡偡傞偲 敿妏僇僞僇僫仺慡妏曄姺偟丄傑偨慡妏塸悢傪敿妏曄姺偟側偑傜
* 張棟傪恑傔偰偄偒傑偡丅戺壒傕張棟懳徾偲側偭偰偍傝傑偡丅
* 偙偺傛偆偵偡傞偙偲偵傛傝丄摨堦偺傕偺傪昞偡傋偒 敿妏丒慡妏傪 摑堦偟偨宍偱
* 惓婯壔偡傞偙偲偑偱偒傑偡丅
*
* @author Tosiki IGA
*/
public class NormalizeZenkakuReader
extends ZenkakuReader
{
/**
* 慡妏傪揔惓壔曄姺偟偰偄偔僋儔僗偺僐儞僗僩儔僋僞
*
* @param Reader reader 楢寢偡傞尦偺Reader
*/
public NormalizeZenkakuReader(Reader reader)
{
super(reader);
}
/**
* 1暥帤Reader偐傜撉傒崬傒傑偡丅
*
* @return int 撉傒崬傫偩暥帤楍
* @throws IOException 壗偐偟傜偺I/O椺奜
*/
public int read()
throws IOException
{
int iRead=reader.read();
if(iRead<0)
{
return iRead;
}
// 敿妏僇僞僇僫偼慡妏壔偟傑偡丅
int iReturn=ZenkakuTable.checkHankakuKatakana(reader,iRead);
if(iReturn>=0)
{
return iReturn;
}
// 慡妏ASCII偼敿妏壔偟傑偡丅
iReturn=ZenkakuTable.checkZenkakuAscii(reader,iRead);
if(iReturn>=0)
{
return iReturn;
}
return iRead;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -