protected Option < TextBundle > loadJavaBundle ( String bundleName , Locale locale ) { Properties properties = new Properties ( ) ; String resource = toJavaResourceName ( bundleName , locale ) ; try { InputStream is = ClassLoaders . getResourceAsStream ( resource , getClass ( ) ) ; if ( null == is ) return Option . none ( ) ; properties . load ( is ) ; is . close ( ) ; } catch ( IOException e ) { return Option . none ( ) ; } finally { } return Option . < TextBundle > from ( new DefaultTextBundle ( locale , resource , properties ) ) ; }
Load java properties bundle with iso - 8859 - 1