예제 #1
0
 public FaceInstance(byte[] raw) {
   ByteArrayInputStream bais = new ByteArrayInputStream(raw);
   XMLDecoder decoder = XMLCodecFactory.getDecoder(BinaryXMLCodec.CODEC_NAME);
   try {
     decoder.beginDecoding(bais);
     decode(decoder);
     decoder.endDecoding();
   } catch (ContentDecodingException e) {
     String reason = e.getMessage();
     Log.fine("Unexpected error decoding FaceInstance from bytes.  reason: " + reason + "\n");
     Log.warningStackTrace(e);
     throw new IllegalArgumentException(
         "Unexpected error decoding FaceInstance from bytes.  reason: " + reason);
   }
 }
예제 #2
0
 protected static void handleException(String message, Exception e) {
   Log.warning(message + " Exception: " + e.getClass().getName() + ": " + e.getMessage());
   Log.warningStackTrace(e);
 }