Skip to content

Commit 2ddeebc

Browse files
committed
Changes some mentions to immutability
1 parent 1e33976 commit 2ddeebc

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Bytes is a utility library that makes it easy to **create**, **parse**, **transform**,
44
**validate** and **convert** byte arrays in Java. It's main class `Bytes` is
55
a collections of bytes and the main API. It supports [endianness](https://en.wikipedia.org/wiki/Endianness)
6-
as well as **immutable** and **mutable** access, so the caller may decide to favor
6+
as well as **copy-on-write** and **mutable** access, so the caller may decide to favor
77
performance. This can be seen as combination of the features provided by
88
[`BigInteger`](https://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html),
99
[`ByteBuffer`](https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html) but
@@ -77,7 +77,7 @@ byte[] result = b.array(); //get as byte array
7777

7878
## API Description
7979

80-
Per default the instance is **immutable**, which means any transformation will
80+
Per default the instance is **semi-immutable**, which means any transformation will
8181
create a copy of the internal array (it is, however, possible to get and
8282
modify the internal array). There is a **mutable** version which supports
8383
in-place modification for better performance and a **read-only** version which

src/main/java/at/favre/lib/bytes/Bytes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1440,7 +1440,7 @@ public Bytes byteOrder(ByteOrder byteOrder) {
14401440

14411441
/**
14421442
* Returns a new read-only byte instance. Read-only means, that there is no direct access to the underlying byte
1443-
* array and all transformers will create a copy (ie. immutable)
1443+
* array and all transformers will create a copy.
14441444
*
14451445
* @return a new instance if not already readonly, or "this" otherwise
14461446
*/

src/main/java/at/favre/lib/bytes/ReadOnlyBytes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
public final class ReadOnlyBytes extends Bytes {
3535

3636
/**
37-
* Creates a new immutable instance
37+
* Creates a new read-only instance
3838
*
3939
* @param byteArray internal byte array
4040
* @param byteOrder the internal byte order - this is used to interpret given array, not to change it

0 commit comments

Comments
 (0)