If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > JAVA > Helo need for Java NIO

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-20-09, 23:39
Mahfuz Mahfuz is offline
Registered User
 
Join Date: Nov 2003
Location: Dhaka,Bangladesh
Posts: 86
Helo need for Java NIO

String ss = "56";
String mm = "07";
String HH = "15";
String DD = "20" ;
String MM = "01";
String yy1 = "09";
String yy2 = "20";

String[] dateByteFormat = new String[7];

dateByteFormat[0] = ss;

dateByteFormat[1] = mm;

dateByteFormat[2] = HH;

dateByteFormat[3] = DD;

dateByteFormat[4] = MM;

dateByteFormat[5] = yy1;

dateByteFormat[6] = yy2;

for

(int i = 0; i<dateByteFormat.length;i++)
{

mBuf.put(pos,Byte.parseByte(dateByteFormat[i]));

pos ++;

}

out.write(mBuf.array());


The 7 byte is saving but all are in HEX format. It wan to save these 7 byte exactly same value not in HEX in the file. can u please help me?

need to save in file exactly in selected position as per attachment.

56 07 15 20 01 09 20

Please help me.
__________________
hello
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On