diff --git a/src/com/limelight/Limelight.java b/src/com/limelight/Limelight.java index 92f7609..f11d131 100644 --- a/src/com/limelight/Limelight.java +++ b/src/com/limelight/Limelight.java @@ -48,8 +48,9 @@ public class Limelight implements NvConnectionListener { try { fos = new FileOutputStream(destination); int read; - while ((read = resource.read()) != -1) { - fos.write(read); + byte[] readBuffer = new byte[16384]; + while ((read = resource.read(readBuffer)) != -1) { + fos.write(readBuffer, 0, read); } } finally { if (fos != null) {