byte[] data = new byte[NFS2Client.MAX_DATA];
int count;
while (src.remaining() > 0) {
count = Math.min(NFS2Client.MAX_DATA, src.remaining());
src.get(data, 0, count);
client.writeFile(entry.getFileHandle(), (int) fileOffset, data, 0, count);
fileOffset += count;
}
} catch (NFS2Exception e) {
throw new IOException("Error writing file . Reason: " + e.getMessage(), e);
}