How to make a list from file text in J2ME

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 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.
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 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... mask tool (T key) and make formatting as looking here. Write Text: Now write
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 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... Take another new file for text. Take a New File: Now take a new file to write
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.ADS_TO_REPLACE_1 Text Formatting: Choose Horizontal type tool (T key) and make
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 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
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.ADS_TO_REPLACE_1 Text Formatting
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
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.ADS_TO_REPLACE_1
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 by this tutorials. Text formatting: Choose "white" color and Horizontal type
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...) and make formatting to write text in the document as I have done here
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...) and make formatting to write text as given here. 
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.ADS_TO_REPLACE_1 Write Text
Read Lines from text file
read from the text file and displays the output as desired. Unable to read the rest...Read Lines from text file  Here's a brief desc of what my Java code does .. I'm using BufferedReader to read lines from a text files and split each
How to make a golden text,golden text, text effect
How to make a golden text       You might have come across a golden text written in novels, magazines... Write Text: Choose Horizontal type tool (T key) and make formatting
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 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
Reading text from image file - Java Beginners
Reading text from image file  How Read text from image 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 effect, it has been make by some instruction that are mentioned here. New file
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... Text: Choose Horizontal type tool (T key) and make formatting then write text
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
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... (T key) and make text formatting to write text, I have used here my name. ADS
How to make a gzip file in java.
Make a gzip file from any given file. In this tutorial, we will discuss how.... The FileInputStream class create an input stream for reading data from the file. In this example, we will create a GZIP file from a given file. First of all, we will read
Java search word from text file
Java search word from text file In this tutorial, you will learn how to search a word from text file and display data related to that word. Here, we have created a text file student.txt which consists of id, name and marks of few
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.ADS_TO_REPLACE_1 Write text: Choose
Importing data into sql plus from a text file...
Importing data into sql plus from a text file...  How to import a text file into oracle 10g enterprise edition directly to create tables and data
Importing data into sql plus from a text file...
Importing data into sql plus from a text file...  How to import a text file into oracle 10g enterprise edition directly to create tables and data
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..._TO_REPLACE_1 Write text: Choose Horizontal type tool (T key) and make formatting
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.ADS_TO_REPLACE_1 Write Text: Select
How to make a new List in Java
How to make a new List in Java  Hi, I have to create list object in Java. How to make a new List in Java? Thanks (adsbygoogle... the new operator as shown below: List list = new ArrayList(); Thanks
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 candy text effect, make a candy text effect, candy text effect
How to make a candy text effect       This is a candy text effect example, it will guide...) and make same formatting to write text as here. Paste text: After written text
stop word removal from text file
stop word removal from text file  i need java source code for stop word removal from a text file
How to make a glow text effect, make a glow text effect, glow text effect
How to make a glow text effect       Learn here how to make a glow text effect, it has completely... (T key) and make formatting to write text as I have done here. ADS_TO_REPLACE_2
how to update the text file?
how to update the text file?  my textfile with name list.txt: Rice... i want to update the quantity in my text file, if the item i entered matches... InputStreamReader(System.in)); System.out.println("enter the list of items u need"); int n1
Read Text file from Javascript - JSP-Servlet
Read Text file from Javascript  plz send the code How to Retrieve the data from .txt file thru Javascript? And how to find the perticular words in that file
How to evaluate the mathematical expression from the string in J2ME.
How to evaluate the mathematical expression from the string in J2ME.  How to evaluate the mathematical expression from the string in J2ME... expression and get the result as 8 (24).How should i done this in J2ME. In "Java
How to evaluate the mathematical expression from the string in J2ME.
How to evaluate the mathematical expression from the string in J2ME.  How to evaluate the mathematical expression from the string in J2ME... expression and get the result as 8 (24).How should i done this in J2ME. In "Java
Create text file at client's directory from server.
Create text file at client's directory from server.  Need java code to create text file at client's directory from server..... Please Help
binary search tree from text file
binary search tree from text file  How so I go about constructing a binary search tree from a text file, which has letters and numbers, which must be sorted and printed in ascending order. E.g. Text file contents 3 apples pears
How to make an animated text border, make an animated text border, animated text border
How to make an animated text border       Learn an animation by this example, it is a text..._TO_REPLACE_1 Write text: Choose Horizontal type tool (T key) and make
How to make an image full text.
How to make an image full text.     ... option to make an image full text so follow now. Open a file: First open..._TO_REPLACE_4 Put your text in another file: Select text layer and make copy
How to access (MySQL)database from J2ME?
How to access (MySQL)database from J2ME?  I am new to J2ME. I am using NetBeans. Can anyone help me? How to access (MySQL)database from J2ME? ( I search a lot I found that there is need to access database through servlet
How to make a border shine text effect, make a border shine text effect, border shine text effect
How to make a border shine text effect       In this example, we are going to make a shining border of the text, It is very simple by this example. New File
How to make a snow text effect
How to make a snow text effect Apply this example to make a snow text effect perfectly. New File: Take a new black background... tool (T key) and make formatting to write text as here. ADS_TO_REPLACE_2
Count characters from text file in Java
Count characters from text file in Java  At the "Count chracters fro... is a java code that count the occurrence of each character from text file. import... the directory of the text file ("C:\text.txt"). I use Eclipse to run this code. I

Ads