Created
July 10, 2012 02:22
-
-
Save winniehell/3080603 to your computer and use it in GitHub Desktop.
DTN sending fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final AutoCloseInputStream stream = new AutoCloseInputStream(pData); | |
try { | |
final FileChannel channel = stream.getChannel(); | |
final MappedByteBuffer buf = channel.map(FileChannel.MapMode.READ_ONLY, 0, channel.size()); | |
session.send(SERVER_EID, 100, | |
Charset.defaultCharset().decode(buf).toString()); | |
} | |
finally { | |
stream.close(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment