PHP Code:
FileConnection fc = null;
InputStream ips = null;
try
{
String songTitle = theFile.substring(theFile.lastIndexOf('/')+1,theFile.lastIndexOf('.'));
fields2[1].setText(songTitle.toUpperCase());
fields2[1].invalidating();
titleText = songTitle;
saved = true;
fc = (FileConnection)Connector.open("file:///" + theFile , Connector.READ_WRITE);
ips = fc.openInputStream();
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
byte[] buffer = new byte[(int)fc.fileSize()];
while (true)
{
int bytesRead = ips.read( buffer, 0, buffer.length );
if (bytesRead == -1)
break;
byteArrayOutputStream.write( buffer, 0, bytesRead );
}
byteArrayOutputStream.flush();
byte[] result = byteArrayOutputStream.toByteArray();
byteArrayOutputStream.close();
String resultString = new String(result);
try this code please edit it some its long code I gave you only reading the file try this