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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user