There's no direct equivalent of the java.nio
package in .NET. Asynchronous IO is usually handled with Stream.BeginRead
/EndRead
, but it's not really the same model. Could you tell us what you're trying to do?
EDIT: You've now provided the low-level details of what you're trying to do, but as there's no real equivalent for the nio
classes in .NET, you'll either have to write them yourself (not impossible, but a pain) or use a different higher level type. You might be able to use MemoryStream
for example - write into it, then seek back to the start. That's a bit like flipping a byte buffer. However, we can't tell whether or not that's appropriate without more information as to the higher-level goal. There may be a much better way of doing it.