Seeking a ByteArrayInputStream using java.io

后端 未结 3 1601
误落风尘
误落风尘 2021-01-04 10:43

How can I seek (change the position) of a ByteArrayInputStream (java.io)? It is something so obvious, but I can\'t seem to find a method for this a

3条回答
  •  -上瘾入骨i
    2021-01-04 11:46

    If you are creating the ByteArrayInputStream to pass elsewhere, extend the class and manipulate pos (a protected member of ByteArrayInputStream) as you wish.

提交回复
热议问题