public static byte getPropertyAsByte ( final String name , final byte defaultValue ) { if ( PropertiesManager . props == null ) loadProps ( ) ; byte returnValue = defaultValue ; try { returnValue = getPropertyAsByte ( name ) ; } catch ( Throwable t ) { log . error ( "Could not retrieve or parse as byte property [" + name + "], defaulting to [" + defaultValue + "]" , t ) ; } return returnValue ; }
Get the value of the given property as a byte specifying a fallback default value . If for any reason we are unable to lookup the desired property this method returns the supplied default value . This error handling behavior makes this method suitable for calling from static initializers .