List of usage examples for java.util.logging Level SEVERE
Level SEVERE
To view the source code for java.util.logging Level SEVERE.
Click Source Link
From source file:com.imag.nespros.network.devices.PADevice.java
public PADevice(String name) { super(name);/*www. java 2 s . c o m*/ this.setCpuSpeed(1); this.setTotalMemory(5); this.setDeviceType(DeviceType.PA); this.setDeviceName(name); try { byte[] imageInByte; imageInByte = IOUtils.toByteArray(getClass().getClassLoader().getResourceAsStream("image/pa.jpg")); icon = new MyLayeredIcon(new ImageIcon(imageInByte).getImage()); } catch (IOException ex) { Logger.getLogger(AMIDevice.class.getName()).log(Level.SEVERE, null, ex); } }
From source file:com.croer.javaaccess.Structure.java
public Structure(Object object) { Properties properties = new Properties(); try {/*from ww w . j a v a 2s .c o m*/ String fileProps = System.getProperty("user.dir") + "\\target\\classes\\entityStruc.properties"; FileInputStream input = new FileInputStream(fileProps); properties.load(input); } catch (FileNotFoundException ex) { Logger.getLogger(Structure.class.getName()).log(Level.SEVERE, null, ex); } catch (IOException ex) { Logger.getLogger(Structure.class.getName()).log(Level.SEVERE, null, ex); } String type = object.getClass().getName(); String key = properties.getProperty(type + ".key"); String context = properties.getProperty(type + ".context"); if (key == null || context == null) { throw new IllegalArgumentException( "Properties missing for type: " + type + " key " + key + " context " + context); } keyList = Arrays.asList(StringUtils.split(key, "|")); contextList = Arrays.asList(StringUtils.split(context, "|")); }
From source file:br.com.cantina.utils.Backup.java
public String getHash() { byte b[] = null; try (ByteArrayOutputStream bout = new ByteArrayOutputStream(); ObjectOutputStream out = new ObjectOutputStream(bout)) { out.writeObject(this); bout.flush();//from ww w .j a v a 2s .co m b = bout.toByteArray(); } catch (IOException ex) { Logger.getLogger(Backup.class.getName()).log(Level.SEVERE, null, ex); } if (b != null) return DigestUtils.md5Hex(b); return null; }
From source file:com.bookselling.util.FileUtilities.java
public void write(UploadedFile multipartFiles[], String path) { if (multipartFiles != null && multipartFiles.length != 0) { for (UploadedFile multipartFile : multipartFiles) { String fileWithFullPath = path + "/" + multipartFile.getName(); File file = new File(fileWithFullPath); try { FileUtils.writeByteArrayToFile(file, multipartFile.getData()); } catch (IOException ex) { Logger.getLogger(FileUtilities.class.getName()).log(Level.SEVERE, null, ex); }//w w w .j a v a2s . c om } } }
From source file:it.geosolutions.geoservertester.Start.java
/** * Loads the configuration /* w w w .j a v a 2 s .co m*/ * @return the configuration */ private static Configuration loadConfig() { Configuration conf = null; try { conf = new PropertiesConfiguration( GeoServerTester.class.getClassLoader().getResource("configuration.properties")); } catch (ConfigurationException e) { LOG.log(Level.SEVERE, "failed to load configurations"); throw new RuntimeException(e); } return conf; }
From source file:iing.uabc.edu.mx.persistencia.util.BeanManager.java
public BeanManager(String fullClassName) { try {//from w w w .ja v a 2 s.co m //Get class by name Class<T> clazz = (Class<T>) Class.forName(fullClassName); setBeanClass(clazz); } catch (ClassNotFoundException ex) { Logger.getLogger(BeanManager.class.getName()).log(Level.SEVERE, null, ex); } }
From source file:com.krj.karbon.GetFriendsList.java
public static List<SteamAccount> retrieve(String steamId) { String urlString = ""; List<SteamAccount> friends = new ArrayList(); try {/*from www . j a v a2s. c om*/ //http://api.steampowered.com/ISteamUser/GetFriendList/v0001/?key=06326BE3F53F72F8C6EF31C158FBACD7&steamid=76561197976892493&relationship=all String host = "http://api.steampowered.com/"; String path = "ISteamUser/GetFriendList/v0001/"; String key = "?key=06326BE3F53F72F8C6EF31C158FBACD7"; String id = "&steamid=" + steamId; String relationship = "&relationship=all"; urlString = host + path + key + id + relationship; URL url = new URL(urlString); ObjectMapper mapper = new ObjectMapper(); Map<String, Object> JSONMap = mapper.readValue(url, Map.class); Map response = (Map) JSONMap.get("friendslist"); if (response != null) { List<Map> friendMaps = (List<Map>) response.get("friends"); if (friendMaps != null) { for (Map map : friendMaps) { String steamid = (String) map.get("steamid"); SteamAccount friend = GetPlayerSummaries.retrieve(steamid); friend.getOwnedGames(); friends.add(friend); } } } } catch (IOException ex) { Logger.getLogger(GetOwnedGames.class.getName()).log(Level.SEVERE, null, ex); } return friends; }
From source file:com.mobicage.rogerthat.mfr.dal.Streamable.java
protected static Object fromBase64(String base64String) { try {//w w w. j a va2s. c o m ByteArrayInputStream bis = new ByteArrayInputStream(Base64.decodeBase64(base64String)); try { ZipInputStream zip = new ZipInputStream(bis); try { zip.getNextEntry(); ObjectInput in = new ObjectInputStream(zip); try { return in.readObject(); } finally { in.close(); } } finally { zip.close(); } } finally { bis.close(); } } catch (ClassNotFoundException e) { log.log((Level.SEVERE), "ClassNotFoundException while deserializing member", e); return null; } catch (IOException e) { log.log((Level.SEVERE), "IOException while deserializing member", e); return null; } }
From source file:com.akman.excel.view.frmSelectImage.java
/** * @param args the command line arguments *///from w w w . jav a 2s . co m public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { /*if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; }*/ UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(frmSelectImage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(frmSelectImage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(frmSelectImage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(frmSelectImage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new frmSelectImage().setVisible(true); } }); }
From source file:com.imag.nespros.network.devices.DCDevice.java
public DCDevice(String name) { super(name);/*from w w w. j ava2 s .co m*/ this.setCpuSpeed(100); this.setTotalMemory(512); this.setDeviceType(DeviceType.DC); this.setDeviceName(name); try { byte[] imageInByte; imageInByte = IOUtils.toByteArray(getClass().getClassLoader().getResourceAsStream("image/dc.jpeg")); icon = new MyLayeredIcon(new ImageIcon(imageInByte).getImage()); } catch (IOException ex) { Logger.getLogger(AMIDevice.class.getName()).log(Level.SEVERE, null, ex); } }