Hi I am trying to implement the interface SourceStream in my application and overrides the method read(byte[],off,len) and I read the bytes from a server.But I want to convert those byte stream into String for that I used a string object by new String(byte[]) but it asks the initial byte in off and length of the bytes ie len as parameters..Why it is asking like that, as we contain only Strring(bye[])only. can any one help me…Thanks
Hi I am trying to implement the interface SourceStream in my application and overrides
Share
If you just have a
byte[]then you can create a newStringvia theString(byte[],int,int)constructor provided by the API.In your case you would do
EDIT:
Try something like this: