scripting: fix array copy and, use System.arraycopy

Change-Id: If8addcc5d95f610ade404e62e4a2a775319e9ff3
Reviewed-on: https://gerrit.libreoffice.org/11354
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
This commit is contained in:
rbuj
2014-09-09 15:38:30 +02:00
committed by Noel Grandin
parent ae083c1cf4
commit 0876cc15fc

View File

@@ -71,10 +71,7 @@ public class XOutputStreamWrapper extends OutputStream {
throw new java.io.IOException( "Stream is null" );
}
byte[] bytes = new byte[len];
for ( int i=off; i< off+len; i++ )
{
bytes[i] = b[i];
}
System.arraycopy(b, off, bytes, 0, len);
try
{
m_xOutputStream.writeBytes(bytes);