List of utility methods to do File Name Create
String | makeFileName(String prefix, String filename) Makes a 'standard' helper file name. FastStringBuffer sb = null; if (filename != null) { String[] parts = filename.split("[/|\\\\]"); sb = new FastStringBuffer(prefix); for (int i = 0; i < parts.length; i++) { if ((i == 0 && parts.length == 1) || i > 0) { sb.append(parts[i]); return sb == null ? null : sb.toString(); |
String | createImageName() create Image Name SimpleDateFormat dateFormat = new SimpleDateFormat( "yyyyMMdd_HHmmss"); return "IMG" + dateFormat.format(new Date(System.currentTimeMillis())) + ".jpg"; |
String | getLocalDateTimeForFileName(Date date) Return current date time as a concatenated string, to be used as filename. final SimpleDateFormat sdf = new SimpleDateFormat("MMddyyyy_HHmmss"); sdf.setTimeZone(TimeZone.getDefault()); return sdf.format(date); |
String | getJpegFileName(long fileNumber) get Jpeg File Name return String.format("%s%016x%s", FILE_PREFIX, fileNumber, JPEG_SUFFIX); |
String | getMetadataFileName(long fileNumber) get Metadata File Name return String.format("%s%016x%s", FILE_PREFIX, fileNumber, METADATA_SUFFIX); |
String | getYuvFileName(long fileNumber) get Yuv File Name return String.format("%s%016x%s", FILE_PREFIX, fileNumber, YUV_SUFFIX); |