• Post Reply Bookmark Topic Watch Topic
  • New Topic

ByteBuffer to binary type?  RSS feed

 
sahar eb
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
edited post:
Hi,
I have this saveDoc_Node() method which receives binary data(bytebuffer), and I have this nodeList which is a String, in amazon Dynamo tutorial it uses this compressString() function to convert the String to buffer as below. Now the problem is, Java throws me: save function expects B(as binary or bytebuffer) but received String. Can you have a look and tell me where I am doing wrong???

p.s. when I am debugging I can see that the nodelist is filled with a heapByteBuffer. Is heapByteBuffer same as ByteBuffer? may be thats why JAva treats it as an String?




here is the compressString:







here is the error:



thanks!
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please define what you mean by binary here. Are you looking for a binary String? A number/numbers? A byte[]?
 
sahar eb
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Steve, I edited the post. I hope now is more clear
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I can't be of any more help to you. This question is more about the specific DynamoDB product and how you are supposed to supply data to it. Since I don't know that product I can't be of any help. Perhaps you could try contacting Amazon Web Services support?
 
sahar eb
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI Steve,
Thanks for replying. apparently I needed to set the get method with the same data type as the set method. as I wasnt It throws me that error.

Thanks any way!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!