private static <T> T safeProcess(final String what, final Metadata metadata, final T defaultValue, final SafeSupplier<T> supplier) {
        if (metadata == null) {
            return defaultValue;
        }
        try {
            return supplier.get();
        } catch (final Exception e) {
            Log.i("[MetadataUtils] Problem reading '" + what + "'", e);
            return defaultValue;
        }
    }
Tries to read metadata from given stream, assuming it is an image data stream

@param description describes the stream. Used for logging in case of errors
@param imageStream image data stream
@param closeAfter  if true, stream is closed after read
@return Metadata read, or null if metadata could not be read
main/src/main/java/cgeo/geocaching/utils/MetadataUtils.java