+Sun Mar 14 18:54:14 EST 2004
+jcifs-0.8.2 released
+
+The DST adjustement used may not be correct. It has been commented out. The
+problem regarding SmbFile.getParent has been fixed.
+
Thu Feb 26 19:26:14 EST 2004
jcifs-0.8.1 released
+Sun Mar 14 18:54:14 EST 2004
+jcifs-0.8.2 released
+
+The DST adjustement used may not be correct. It has been commented out. The
+problem regarding SmbFile.getParent has been fixed.
+
Thu Feb 26 19:26:14 EST 2004
jcifs-0.8.1 released
<target name="jar" depends="smb">
<copy file="src/jcifs/util/mime.map" tofile="build/jcifs/util/mime.map" overwrite="yes"/>
<copy file="src/jcifs/http/ne.css" tofile="build/jcifs/http/ne.css" overwrite="yes"/>
- <jar jarfile="jcifs-0.8.1.jar" basedir="build"/>
+ <jar jarfile="jcifs-0.8.2.jar" basedir="build"/>
</target>
<target name="tgz">
- <copy todir="dist_tmp/jcifs_0.8.1">
+ <copy todir="dist_tmp/jcifs_0.8.2">
<fileset dir="." excludes="ant,**/.*,build,jcifs.prp,**/*.tgz,**/*.zip"/>
</copy>
- <tar tarfile="jcifs-0.8.1.tar" basedir="dist_tmp"/>
- <gzip src="jcifs-0.8.1.tar" zipfile="jcifs-0.8.1.tgz"/>
- <delete file="jcifs-0.8.1.tar"/>
+ <tar tarfile="jcifs-0.8.2.tar" basedir="dist_tmp"/>
+ <gzip src="jcifs-0.8.2.tar" zipfile="jcifs-0.8.2.tgz"/>
+ <delete file="jcifs-0.8.2.tar"/>
<delete dir="dist_tmp"/>
</target>
<target name="zip">
- <copy todir="dist_tmp/jcifs_0.8.1">
+ <copy todir="dist_tmp/jcifs_0.8.2">
<fileset dir="." excludes="ant,**/.*,build,jcifs.prp,**/*.tgz,**/*.zip"/>
</copy>
<fixcrlf srcdir="dist_tmp" cr="add" tab="remove" tablength="4" excludes="**/*.jar,**/*.exe"/>
- <zip zipfile="jcifs-0.8.1.zip" basedir="dist_tmp"/>
+ <zip zipfile="jcifs-0.8.2.zip" basedir="dist_tmp"/>
<delete dir="dist_tmp"/>
</target>
public class FileInfo {
- static final String TYPES[] = {
- "TYPE_COMM",
- "TYPE_FILESYSTEM",
- "TYPE_NAMED_PIPE",
- "TYPE_PRINTER",
- "TYPE_SERVER",
- "TYPE_SHARE",
- "TYPE_WORKGROUP"
- };
+ static String getTypeName(int type) {
+ switch( type ) {
+ case SmbFile.TYPE_FILESYSTEM:
+ return "TYPE_FILESYSTEM";
+ case SmbFile.TYPE_WORKGROUP:
+ return "TYPE_WORKGROUP";
+ case SmbFile.TYPE_SERVER:
+ return "TYPE_SERVER";
+ case SmbFile.TYPE_SHARE:
+ return "TYPE_SHARE";
+ case SmbFile.TYPE_NAMED_PIPE:
+ return "TYPE_NAMED_PIPE";
+ case SmbFile.TYPE_PRINTER:
+ return "TYPE_PRINTER";
+ default:
+ return "UNKNOWN: " + type;
+ }
+ }
public static void main( String argv[] ) throws Exception {
int i, start, end;;
System.out.println( " getUncPath: " + f.getUncPath() );
break;
case 10:
- System.out.println( " getType: " + TYPES[f.getType()] );
+ System.out.println( " getType: " + getTypeName(f.getType()));
break;
case 11:
System.out.println( " getShare: " + f.getShare() );
long t = ((long)hi << 32 ) | ( (long)low & 0xFFFFFFFFL );
t = ( t / 10000L - MILLISECONDS_BETWEEN_1970_AND_1601 );
+/*
synchronized( TZ ) {
if( TZ.inDaylightTime( new Date() )) {
// in DST
return t;
}
}
+*/
+ return t;
}
static void writeTime( long t, byte[] dst, int dstIndex ) {
+/*
if( t != 0L ) {
synchronized( TZ ) {
if( TZ.inDaylightTime( new Date() )) {
t = (t + MILLISECONDS_BETWEEN_1970_AND_1601) * 10000L;
}
+*/
writeLong( t, dst, dstIndex );
}
*/
public String getParent() {
- StringBuffer sb = new StringBuffer( "smb://" );
String str = url.getAuthority();
+
if( str.length() > 0 ) {
+ StringBuffer sb = new StringBuffer( "smb://" );
+
sb.append( str );
- sb.append( '/' );
- }
- getUncPath0();
- if( canon.length() > 1 ) {
- int i = canon.length() - 2;
- while( canon.charAt( i ) != '/' ) {
- i--;
- }
- if( i > 1 ) {
- sb.append( canon.substring( 1, i ));
+
+ getUncPath0();
+ if( canon.length() > 1 ) {
+ sb.append( canon );
+ } else {
sb.append( '/' );
}
+
+ str = sb.toString();
+
+ int i = str.length() - 2;
+ while( str.charAt( i ) != '/' ) {
+ i--;
+ }
+
+ return str.substring( 0, i + 1 );
}
- return sb.toString();
+
+ return "smb://";
}
/**