dcsimg
using Util.arrayCopy: store data to an array of size more than 255 bytes
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sudha_Naidu
Posted On:   Tuesday, March 28, 2006 05:05 AM

Hi, i need to store an image into the card. I am following the photocard example, but not able to copy more than 250 bytes into an array of size say 1600 bytes using Util.arrayCopy. can anyone suggest me a way to load photo into a single array..or do i have to create different arrays of size 250 to store the photo? snippet of my code: private Object[] UserData; byte data_offset = (byte)0x00; byte photo_offset = (byte)0x00; ...... ...... UserData = new Object[(short)2]; UserData[0] = new byte[1600]; //store user data UserData[1] = new byte[4096]; //store user photo ..... ..... byte[] temp = (byte[])UserData[   More>>


Hi,


i need to store an image into the card. I am following the photocard example, but not able to copy more than 250 bytes into an array of size say 1600 bytes using Util.arrayCopy. can anyone suggest me a way to load photo into a single array..or do i have to create different arrays of size 250 to store the photo?


snippet of my code:


			
private Object[] UserData;
byte data_offset = (byte)0x00;
byte photo_offset = (byte)0x00;
......
......
UserData = new Object[(short)2];
UserData[0] = new byte[1600]; //store user data
UserData[1] = new byte[4096]; //store user photo
.....
.....
byte[] temp = (byte[])UserData[(short)0];
Util.arrayCopy(buffer, (short)ISO7816.OFFSET_CDATA, temp, (short)data_offset, (short)0xc8);
data_offset = (byte)(data_offset + 0xc8);



//WORKS FINE TILL HERE...WHEN THE SAME COMMAND IS CALLED AGAIN WITH THE NEXT 200 BYTES OF DATA, RETURNS AN ERROR OF 6F00 ( NO SPECIFIC DIAGNOSIS)



Regards,
Sudha

   <<Less
About | Sitemap | Contact