mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8273528: Avoid ByteArrayOutputStream.toByteArray when converting stream to String
Reviewed-by: bpb, xuelei, serb, aivanov
This commit is contained in:
parent
54dee132d1
commit
2e321dc782
4 changed files with 5 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -261,7 +261,7 @@ public class BitArray {
|
|||
out.write(get(i) ? '1' : '0');
|
||||
}
|
||||
|
||||
return new String(out.toByteArray());
|
||||
return out.toString();
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue