All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.upokecenter.text.encoders.AppResources Maven / Gradle / Ivy

Go to download

A Java library that implements character encodings used in Web pages and email.

There is a newer version: 0.6.0
Show newest version
package com.upokecenter.text.encoders;

import java.util.*;

  final class AppResources {

    private ResourceBundle mgr;

    public AppResources(String name) {
      this.mgr = ResourceBundle.getBundle(name);
    }

    public short[] GetShortArray(String name) {
      String str = this.mgr.getString(name);
      if(str==null || (str.length()&3) != 0){
         return null;
      }
      short[] ret=new short[str.length()>>2];
      int k=0;
      for(int i=0;i='0' && d<='9'){
           d=(int)(d-'0');
         } else if(d>='a' && d<='f'){
           d=(int)(d-'a')+10;
         } else if(d>='A' && d<='F'){
           d=(int)(d-'A')+10;
         } else return null;
         c|=(d<>3];
      int k=0;
      for(int i=0;i='0' && d<='9'){
           d=(int)(d-'0');
         } else if(d>='a' && d<='f'){
           d=(int)(d-'a')+10;
         } else if(d>='A' && d<='F'){
           d=(int)(d-'A')+10;
         } else return null;
         c|=(d<




© 2015 - 2024 Weber Informatics LLC | Privacy Policy