aspose file tools*
The moose likes Beginning Java and the fly likes how to read a gsm file in java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "how to read a gsm file in java" Watch "how to read a gsm file in java" New topic
Author

how to read a gsm file in java

preethi Ayyappan
Ranch Hand

Joined: Oct 04, 2007
Posts: 518
Hi

I need to read a gsm file from a path and store it in a database.Is it possible to read and get a gsm file in a variable?

Thanks.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40034
    
  28
It is easy enough to read lots of different files, as long as you have access to the format they are in. I am sure you know it already, but there are reminders in the Java Tutorials. It depends whether it is text-based or binary; I am not familiar with gsm files myself.
For entering into a database, if you go through the JDBC forum, somebody said earlier this week you should create a .sql file and call that from the database for better performance.
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2718
    
    6

I don't know of the gsm extension in particular, a Google says that there are three different types of files that have the same extension.

But no matter which file it is, there should be no problem in reading/writing it.

[Edit: Campbell beat me on that ]
[ October 10, 2008: Message edited by: Amit Ghorpade ]

SCJP, SCWCD.
|Asking Good Questions|
preethi Ayyappan
Ranch Hand

Joined: Oct 04, 2007
Posts: 518
Thanks for your replies.I can able to read.But can i able to save a gsm file in a variable like String voice="hello.gsm" ?Is this possible?
Coz if i need to store it in database ,I need to keep the gsm file only in String variable.Isn't it?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42910
    
  68
You didn't say what kind of file this is, but I'm assuming that it is a binary file, not a text file. So you can't keep it in a string (unless you want to use base-64 encoding or some such), but instead you need to use a byte[]. The corresponding DB type would be a BLOB.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to read a gsm file in java