ICU-3301 double path separator will make finding files fail while streaming form jar files

X-SVN-Rev: 15200
This commit is contained in:
Ram Viswanadha 2004-05-07 23:24:51 +00:00
parent f749192d05
commit 57a7141288
9 changed files with 11 additions and 11 deletions

View file

@ -47,7 +47,7 @@ public final class NormalizerImpl {
* unorm.icu, which is generated with the gennorm tool.
* The format of that file is described at the end of this file.
*/
private static final String DATA_FILE_NAME = UResourceBundle.ICU_BUNDLE+"unorm.icu";
private static final String DATA_FILE_NAME = UResourceBundle.ICU_BUNDLE+"/unorm.icu";
// norm32 value constants

View file

@ -1048,7 +1048,7 @@ public final class UCharacterName
/**
* Default name of the name datafile
*/
private static final String NAME_FILE_NAME_ = UResourceBundle.ICU_BUNDLE+"unames.icu";
private static final String NAME_FILE_NAME_ = UResourceBundle.ICU_BUNDLE+"/unames.icu";
/**
* Shift count to retrieve group information
*/

View file

@ -1312,7 +1312,7 @@ public final class UCharacterProperty implements Trie.DataManipulate
/**
* Default name of the datafile
*/
private static final String DATA_FILE_NAME_ = UResourceBundle.ICU_BUNDLE+"uprops.icu";
private static final String DATA_FILE_NAME_ = UResourceBundle.ICU_BUNDLE+"/uprops.icu";
/**
* Default buffer size of datafile

View file

@ -102,7 +102,7 @@ public final class UPropertyAliases implements ICUBinary.Authenticate {
/**
* Name of the datafile
*/
private static final String DATA_FILE_NAME = UResourceBundle.ICU_BUNDLE+"pnames.icu";
private static final String DATA_FILE_NAME = UResourceBundle.ICU_BUNDLE+"/pnames.icu";
/**
* Buffer size of datafile. The whole file is < 16k.

View file

@ -125,7 +125,7 @@ final class BreakIteratorFactory extends BreakIterator.BreakIteratorServiceShim
// Class for new RBBI engine.
// Open a stream to the .brk file. Path to the brk files has this form:
// data/icudt30b/line.brk (30 is version number)
String rulesFileName = UResourceBundle.ICU_BUNDLE + KIND_NAMES_2[kind] + ".brk";
String rulesFileName = UResourceBundle.ICU_BUNDLE +"/"+ KIND_NAMES_2[kind] + ".brk";
InputStream is = ICUData.getStream(rulesFileName);
if (is == null) {
// Temporary!!! Try again with break files named data/icudt28b_char.brk
@ -133,7 +133,7 @@ final class BreakIteratorFactory extends BreakIterator.BreakIteratorServiceShim
// used during development, this code can be removed once
// the data is in the data directory, above. TODO: remove
// the following code, make this catch turn around and throw.
rulesFileName = UResourceBundle.ICU_BUNDLE +
rulesFileName = UResourceBundle.ICU_BUNDLE + "/" +
KIND_NAMES_2[kind] + ".brk";
is = ICUData.getRequiredStream(rulesFileName);
}

View file

@ -38,7 +38,7 @@ import com.ibm.icu.text.RuleBasedCollator.UCAConstants;
final class CollatorReader
{
static char[] read(RuleBasedCollator rbc, UCAConstants ucac) throws IOException {
InputStream i = ICUData.getRequiredStream(UResourceBundle.ICU_BUNDLE+"ucadata.icu");
InputStream i = ICUData.getRequiredStream(UResourceBundle.ICU_BUNDLE+"/ucadata.icu");
BufferedInputStream b = new BufferedInputStream(i, 90000);
CollatorReader reader = new CollatorReader(b);
char[] result = reader.readImp(rbc, ucac);
@ -64,7 +64,7 @@ final class CollatorReader
static InverseUCA getInverseUCA() throws IOException {
InverseUCA result = null;
InputStream i = ICUData.getRequiredStream(UResourceBundle.ICU_BUNDLE+"invuca.icu");
InputStream i = ICUData.getRequiredStream(UResourceBundle.ICU_BUNDLE+"/invuca.icu");
// try {
// String invdat = "/com/ibm/icu/impl/data/invuca.icu";
// InputStream i = CollationParsedRuleBuilder.class.getResourceAsStream(invdat);

View file

@ -84,7 +84,7 @@ public final class IDNA {
/* private constructor to prevent construction of the object */
private IDNA(){
try{
InputStream stream = ICUData.getRequiredStream(UResourceBundle.ICU_BUNDLE+"uidna.spp");
InputStream stream = ICUData.getRequiredStream(UResourceBundle.ICU_BUNDLE+"/uidna.spp");
namePrep = new StringPrep(stream);
stream.close();
}catch (IOException e){

View file

@ -452,7 +452,7 @@ public class RBBIDataWrapper {
}
System.out.println("RBBIDataWrapper.main(" + s + ") ");
String versionedName = ICUResourceBundle.ICU_BUNDLE+ s + ".brk";
String versionedName = ICUResourceBundle.ICU_BUNDLE+"/"+ s + ".brk";
try {
RBBIDataWrapper This = RBBIDataWrapper.get(versionedName);

View file

@ -58,7 +58,7 @@ public abstract class UResourceBundle extends ResourceBundle{
/**
* @draft ICU 3.0
*/
public static final String ICU_COLLATION_BASE_NAME = "/"+ICU_BASE_NAME + "coll";
public static final String ICU_COLLATION_BASE_NAME = ICU_BASE_NAME + "/coll";
/**
* @draft ICU 3.0