本文整理了Java中org.apache.commons.compress.archivers.zip.ZipUtil.toDosTime()
方法的一些代码示例,展示了ZipUtil.toDosTime()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipUtil.toDosTime()
方法的具体详情如下:
包路径:org.apache.commons.compress.archivers.zip.ZipUtil
类名称:ZipUtil
方法名:toDosTime
[英]Convert a Date object to a DOS date/time field.
Stolen from InfoZip's fileio.c
[中]将日期对象转换为DOS日期/时间字段。
从InfoZip的fileio.c
中被盗
代码示例来源:origin: org.apache.commons/commons-compress
/**
* Convert a Date object to a DOS date/time field.
*
* <p>Stolen from InfoZip's <code>fileio.c</code></p>
* @param t number of milliseconds since the epoch
* @return the date as a byte array
*/
public static byte[] toDosTime(final long t) {
final byte[] result = new byte[4];
toDosTime(t, result, 0);
return result;
}
代码示例来源:origin: org.apache.commons/commons-compress
/**
* Convert a Date object to a DOS date/time field.
*
* <p>Stolen from InfoZip's <code>fileio.c</code></p>
* @param t number of milliseconds since the epoch
* @param buf the output buffer
* @param offset
* The offset within the output buffer of the first byte to be written.
* must be non-negative and no larger than <tt>buf.length-4</tt>
*/
public static void toDosTime(final long t, final byte[] buf, final int offset) {
toDosTime(Calendar.getInstance(), t, buf, offset);
}
代码示例来源:origin: org.apache.commons/commons-compress
/**
* Convert a Date object to a DOS date/time field.
* @param time the <code>Date</code> to convert
* @return the date as a <code>ZipLong</code>
*/
public static ZipLong toDosTime(final Date time) {
return new ZipLong(toDosTime(time.getTime()));
}
代码示例来源:origin: org.apache.commons/commons-compress
ZipUtil.toDosTime(calendarInstance, ze.getTime(), buf, CFH_TIME_OFFSET);
代码示例来源:origin: org.apache.commons/commons-compress
ZipUtil.toDosTime(calendarInstance, ze.getTime(), buf, LFH_TIME_OFFSET);
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
/**
* Convert a Date object to a DOS date/time field.
*
* <p>Stolen from InfoZip's <code>fileio.c</code></p>
* @param t number of milliseconds since the epoch
* @return the date as a byte array
*/
public static byte[] toDosTime(final long t) {
final byte[] result = new byte[4];
toDosTime(t, result, 0);
return result;
}
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
/**
* Convert a Date object to a DOS date/time field.
*
* <p>Stolen from InfoZip's <code>fileio.c</code></p>
* @param t number of milliseconds since the epoch
* @param buf the output buffer
* @param offset
* The offset within the output buffer of the first byte to be written.
* must be non-negative and no larger than <tt>buf.length-4</tt>
*/
public static void toDosTime(final long t, final byte[] buf, final int offset) {
toDosTime(Calendar.getInstance(), t, buf, offset);
}
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
/**
* Convert a Date object to a DOS date/time field.
* @param time the <code>Date</code> to convert
* @return the date as a <code>ZipLong</code>
*/
public static ZipLong toDosTime(final Date time) {
return new ZipLong(toDosTime(time.getTime()));
}
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
ZipUtil.toDosTime(calendarInstance, ze.getTime(), buf, CFH_TIME_OFFSET);
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
ZipUtil.toDosTime(calendarInstance, ze.getTime(), buf, LFH_TIME_OFFSET);
内容来源于网络,如有侵权,请联系作者删除!