Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners How to make a list from file text in J2ME
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Wahyudi Rahmat
How to make a list from file text in J2ME
0 Answer(s)      4 years and 10 months ago
Posted in : Java Beginners


I was trying to make a method that read file from text and make a list of it, I have tried ReadHelpText method and want to make some improvement,
I've tried like this

private String readHelpText( ) {
InputStream is = getClass().getResourceAsStream( "kamus.txt" );
try {
StringBuffer sb = new StringBuffer( );
int chr, i = 0;
while ((chr = is.read()) != 9) //9 = ASCII untuk tab (HT)
sb.append((char) chr);
return sb.toString( );
} catch (Exception e) {
}
return null; }

kamus.txt file contains:
icon<HT>Sebuah lambang kecil berupa gambar yang tampak pada layar komputer.<CR><LF>
ide<HT>Integrated Drive Electronics; Sebuah tipe hardware interface yang berfungsi untuk menghubungkan harddisk.<CR><LF>

If I used method that i've created above it will return:
icon

but what i want is that method is return:
icon
ide

so I mean, it read the kamus.txt file contents but if it read <HT> that methode will ignoring the next sentence and continuing read the next line, I've thinking about using array, but i still confused to implementing it..
please, please help me about this problem..

i'd be grate full, and thanks before.
regards: Wahyu.

Advertisement
View Answers

Related Tutorials/Questions & Answers:
How to make a list from file text in J2ME - Java Beginners
How to make a list from file text in J2ME  I was trying to make a method that read file from text and make a list of it, I have tried ReadHelpText method and want to make some improvement, I've tried like this private String
How to load file from the directory in J2ME?
How to load file from the directory in J2ME?  Video player J2ME. I have a folder name "music". I want to display all file with extension is "*.mpg" on the List. How can I do it, plz help me
Advertisements
how to text send from list to textbox - Swing AWT
how to text send from list to textbox  dear sir/madam I whant to send text from list to textbox. plz give me solution for this problem.   Hi friend, Plz explain the problem in details to solve it and specify
how to match the key word from a text file
how to match the key word from a text file  p>Hi all, I have the code to match the key word and from the text. I have input like this reader.txt... want to get the value from the called file and get the result. String regex1
how to delete a jar file from mobile by using j2me program.
how to delete a jar file from mobile by using j2me program.  When i'll update a new version jar in mobile. Then i want to delete that old jar which is previously present in mobile. How to do
How to make a transparent text
How to make a transparent text Learn how to make a transparent text effect with this example. New File: Take a new file with white...) and make formatting as looking here. Write Text: Now write your text
how to make drop down list in JSF & fetch data Item from database
how to make drop down list in JSF & fetch data Item from database  how to make drop down list in JSF & fetch data Item from database
How to make a cloudy text, cloudy text, text
How to make a cloudy text      ... to do that.  After this you will able to make a cloudy text. Here... of you text as I have done here. Take another new file for text. Take a New File
How to make a file in java
Description: This example demonstrate how to make a file and write string in it. To create a file in java we use the File Class. The instance of the File class is immutable that means the pathname represented by the File object
How to make a 3D text, make a 3D text, a 3D text
How to make a 3D text      ... will guide you to make it. New File: Take a new file with any size as you like. Text... text on the file. Drop shadow: Go to Layer menu > Layer style > Drop shadow
how to make list in our own style in pdfwriter
how to make list in our own style in pdfwriter  can u please any of one help me i want to make a list as follows in pdf file from java by pdfwriter account calculation ------------------------- amount -100.00
How to make a grass text, make a grass text, grass text
How to make a grass text       Come to know how to make a grass text effect. New File: Take a new file with any size as you want. Text Formatting: Select Horizontal
How to make a colorful text, make a colorful text, colorful text
How to make a colorful text       You can learn here a color full text effect, this example. New File: Create a new file with any size. Write Text: Choose any color
How to make a gel text, make a gel text, a gel text
How to make a gel text       This example will help you to draw a gel text effect, it is very easy to make. New File: Take a new file with any size as you want. Effects: Go
How to make an animation in the text, make an animation in the text, an animation in the text
How to make an animation in the text   ..., in this example we are going to make animation in the text that is so easy... tool (T key) then make formatting to write text. Effect: Go to Layer menu >
How to make a honey text, make a honey text, honey text
How to make a honey text      ... text will convert into a selection then make copy. New File: Now take... tool (T key) and make formatting to write text in the document as I have
How to make a dropping text, make a dropping text, dropping text
How to make a dripping text       Making a dripping text is not tough now because this example has... document. Write text: Choose Horizontal type tool (T key) and make
how to create text file from jsp and provide downlode option
how to create text file from jsp and provide downlode option  HI... in java/j2ee tech. my question is who do i make a jsp output in the form of text file so that pepole can downlode that text file or may be some other file formate
How to make a golden text,golden text, text effect
How to make a golden text      ... File: First take a new black background file as I have here. Write Text: Choose Horizontal type tool (T key) and make formatting then write any text
How to extract a specific line from a text file? - IoC
How to extract a specific line from a text file?  Hi all, i'm trying to write a code that return a specific line from a text file. so my first... 100 to 120 for example. My Text file contain numbers and words. How i have
List in J2ME
List in J2ME       J2ME Canvas List Example will explain you, how to create list of items. In this example we are going to create a simple list of text, that will show
How to make a chrome text effect, make a chrome text effect, chrome text effect
How to make a chrome text effect       With this example we will learn how to make a chrome text effect. New File: Take any colored background file as I have here
How to make a text effect.
How to make a text effect.       This is a text effect tutorial, you can make your text... text effect in the Photoshop, so you can use any option for that. New File
How to make a blur text effect, make a blur text effect, blur text effect
How to make a blur text effect       In this example we are going to make a blur text...: Create a new file. Write text: Choose Horizontal type tool (T key) and make
how to update the text file?
how to update the text file?  my textfile with name list.txt: Rice... in my text file, if the item i entered matches with item in text file.how can i...)); System.out.println("enter the list of items u need"); int n1=Integer.parseInt
How to make a reflected a 3D text, make a reflected a 3D text, reflected a 3D text
How to make a reflected a 3D text   ... reflection text effect, It has very simple steps to make it easy for the beginners so follow now. Take a gradient background file as I have here. Text: Choose
How to make text effect
How to make text effect We can make too many text effect in the photoshop, this text effect is one of them. Let's start... New File: Take a new File and adjust the file size as you need. Write Text: Select Horizontal Type
How to make a double border text, make a double border text, double border text
How to make a double border text       This example will teach you to make a double border text... with any size. Text Formatting: Choose Horizontal type tool (T key) and make
how to update the text file?
how to update the text file?  if my text file contains a string and integer in each line say,: aaa 200 bbb 500 ccc 400 i need a java code to update the integer value if my input String matches with the string in file. please
How to make a fade text animation, make a fade text animation, fade text animation
How to make a fade text animation       This is a fade text animation example, it will surely increase... text: Choose Horizontal type tool (T key) and make formatting to write text
How to make burn text as a lava, make burn text as a lava, burn text as a lava
How to make burn text as a lava       This example will help you to make a burn text as a lava... a new file with any size as you like. Write text: Choose Horizontal type tool
Advertisements
 

 

 

DMCA.com