diff options
Diffstat (limited to 'l10ntools/java/l10nconv/java/com/sun/star/tooling/languageResolver/LanguageResolver.java')
-rwxr-xr-x | l10ntools/java/l10nconv/java/com/sun/star/tooling/languageResolver/LanguageResolver.java | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/l10ntools/java/l10nconv/java/com/sun/star/tooling/languageResolver/LanguageResolver.java b/l10ntools/java/l10nconv/java/com/sun/star/tooling/languageResolver/LanguageResolver.java index 4015c3acd2a7..5dbc8b68b32d 100755 --- a/l10ntools/java/l10nconv/java/com/sun/star/tooling/languageResolver/LanguageResolver.java +++ b/l10ntools/java/l10nconv/java/com/sun/star/tooling/languageResolver/LanguageResolver.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -26,7 +26,7 @@ ************************************************************************/ /* * Created on 2005 - * by Christian Schmidt + * by Christian Schmidt */ package com.sun.star.tooling.languageResolver; @@ -40,7 +40,7 @@ import java.util.ListIterator; /** * Translate language codes into another format * between ISO, RFC3066 and numeric - * + * * @author Christian Schmidt 2005 * */ @@ -49,21 +49,21 @@ public class LanguageResolver { private final static int LANGID =0; private final static int LANGNAME =1; private final static int RFC3066 =3; - + ArrayList languages=new ArrayList(); - + // public static void main(String[] args){ // try { // LanguageResolver lr=new LanguageResolver(); // } catch (IOException e) { -// // +// // // e.printStackTrace(); // } // } - + /** * Create a new Instance of LanguageResolver - * + * * @throws IOException */ public LanguageResolver() throws IOException{ @@ -71,16 +71,16 @@ public class LanguageResolver { ClassLoader cl = this.getClass().getClassLoader(); InputStream in = cl.getResourceAsStream(lang); BufferedReader languageTable= new BufferedReader(new InputStreamReader(in)); - + String line; - + while((line=(languageTable.readLine()))!=null){ languages.add(line.split(",")); } } /** * Get the numeric value of the given ISO Language Code - * + * * @param isoCode the ISO Language Code to find * @return numeric value of the given isoCode * @throws LanguageResolvingException if the Language ISO Code is not known @@ -94,12 +94,12 @@ public class LanguageResolver { if(line[ISO].equals(isoCode)) return line[LANGID]; } throw new LanguageResolvingException("Can not find ISO Code: "+isoCode ); - + } - + /** * Get the ISO Language Code corresponding with the given Language ID - * + * * @param ID the numeric language id to find * @return the ISO Language Code corresponding with the given Language ID * @throws LanguageResolvingException if the Language ID is not known @@ -114,10 +114,10 @@ public class LanguageResolver { } throw new LanguageResolvingException("Can not find Language Id: "+ID ); } - + /** * Get the RFC3066 value of the given ISO Language Code - * + * * @param isoCode the ISO Language Code to find * @return RFC3066 value of the given isoCode * @throws LanguageResolvingException if the Language ISO Code is not known @@ -132,10 +132,10 @@ public class LanguageResolver { } throw new LanguageResolvingException("Can not find ISO Code: "+isoCode ); } - + /** * Get the ISO Language Code corresponding with the given RFC3066 code - * + * * @param RFC RFC3066 language id to find * @return the ISO Language Code corresponding with the given RFC3066 code * @throws LanguageResolvingException if the RFC3066 code is not known @@ -150,22 +150,22 @@ public class LanguageResolver { } throw new LanguageResolvingException("Can not find Language Id: "+RFC ); } - - + + /** - * This Exception is thrown if a Language Identfier is unknown - * + * This Exception is thrown if a Language Identfier is unknown + * * @author Christian Schmidt 2005 * */ public class LanguageResolvingException extends Exception { /** - * + * */ public LanguageResolvingException() { super(); - // + // } /** @@ -173,7 +173,7 @@ public class LanguageResolver { */ public LanguageResolvingException(String arg0) { super(arg0); - // + // } /** @@ -182,7 +182,7 @@ public class LanguageResolver { */ public LanguageResolvingException(String arg0, Throwable arg1) { super(arg0, arg1); - // + // } /** @@ -190,7 +190,7 @@ public class LanguageResolver { */ public LanguageResolvingException(Throwable arg0) { super(arg0); - // + // } } |