Skip to content

Commit b6247d5

Browse files
author
Jonathan Beaudoin
committed
Added a method to convert MemoryBuffer to byte[]
1 parent 9917f2a commit b6247d5

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/main/java/com/beaudoin/jmm/misc/MemoryBuffer.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,10 @@ public int size() {
8686
return size;
8787
}
8888

89+
public byte[] array() {
90+
byte[] data = new byte[size];
91+
get(data);
92+
return data;
93+
}
94+
8995
}

0 commit comments

Comments
 (0)