Results 1 to 2 of 2
Thread: Read varbinary data in java
- 06-16-2012, 02:18 PM #1
Member
- Join Date
- Jun 2012
- Posts
- 1
- Rep Power
- 0
Read varbinary data in java
Hello,
I made a android application which read some files from SQL server. Those files saved to a varbinary(MAX) field in SQL Server by a third party web service. My problem is that when I want to read those files by my java application, those binary data shows deferent content in java application. In fact I read data byte by byte and I configure that some bytes couldn’t show real values which saved in the data base. I find out that what the problem is, but I couldn’t find a solution yet. I find out that in the web service every varbinary data saves to database as byte data (in .Net each byte takes 0 to 255). But when I want to read the binary data in java, it takes deferent values and cause exception in some values. Because in java byte value takes -127 to 127.
In my java application I want to write those data to a file by OutputStream.write(byte[]) method. How can I solve this problem? I think that I have to find a way to convert c# byte[] to java byte[] (or binary data), but how can I do that?
Regards…
- 06-16-2012, 03:19 PM #2
Re: Read varbinary data in java
Cross posted
.net - Read varbinary data in java - Stack Overflow
dbWhy do they call it rush hour when nothing moves? - Robin Williams
Similar Threads
-
Read data from custom ca
By Petr in forum Java ServletReplies: 2Last Post: 05-11-2011, 12:19 PM -
how do i read a clob data from a function written in oracle in java code
By renu in forum New To JavaReplies: 1Last Post: 03-29-2011, 08:59 AM -
how read a data from a cheque scanner in java
By prabhug1987 in forum NetworkingReplies: 0Last Post: 12-03-2010, 11:39 AM -
Need to Save a data to file from JPanel and read the data back to Jpanel
By yashrajsen in forum AWT / SwingReplies: 1Last Post: 11-09-2010, 09:28 AM -
Does anyone know how to read a log file in .log and output the data using java langua
By motress in forum EclipseReplies: 1Last Post: 02-04-2010, 09:17 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks