Search code examples
javaobjective-cnsdataequivalent

Equivalent of NSData :subdataWithRange in Java?


What is the Java equivalent of NSData :subdataWithRange? I am working on decrypting certain responses I send from a server I created it works fine in the iOS app written in Objective-C but wondering about its equivalent in Java


Solution

  • I believe the answer is to use ByteArrayOutputStream and convert things to a byte[]. ByteBuffer is another alternative.