[jcifs] jCIFS housecleaning questions
eglass1 at comcast.net
eglass1 at comcast.net
Tue Jul 8 22:14:57 EST 2003
Mike,
I went through and did a general code cleanup on most of my stuff; I had a
couple of questions before putting the finishing touches on, though:
1) In NtlmHttpFilter, we cache the name of the domain controller, and then do:
UniAddress.getByName(domainController, true);
to get the UniAddress in each call to doFilter. In NtlmServlet, however, we
have it doing the lookup in the initializer and storing the UniAddress object
for future use. I'm not sure if UniAddress does its own name caching, so the
latter may or may not be more efficient. Which approach should I adopt?
2) I wasn't able to locate the ServerMessageBlock.writeTime function mentioned
previously; there is a writeTime method, but it appears to be the complement of
readUTime (using a 32-bit value). There is a readTime that *reads* the 64-bit
time value I am looking to write, but I couldn't locate a corresponding writer
function. As a reference, I'm currently implementing this as:
static void writeTime(long time, byte[] dest, int offset) {
time += 11644473600000l; // milliseconds from January 1, 1601 -> epoch.
time *= 10000; // tenths of a microsecond.
for (int i = 0; i < 8; i++, time >>>= 8) dest[offset + i] = (byte) time;
}
But the daylight savings adjustments made in the other *Time methods would
probably be appropriate.
3) I *think* the only usage of Base64 is in the HTTP stuff; if so, I was going
to suggest the possibility of using the attached implementation. It's quite a
bit cleaner, and about 2.5X faster. This isn't as general-purpose as our
current implementation, however (it doesn't implement linewrapping, but neither
does HTTP).
Let me know how I should proceed on these, and I'll repost my updated items.
Thanks!
Eric
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/octet-stream
Size: 2496 bytes
Desc: not available
Url : http://lists.samba.org/archive/jcifs/attachments/20030708/b8d1947a/attachment.obj
More information about the jcifs
mailing list