Results 1 to 6 of 6
Thread: Non Allocating String Buffer
- 10-24-2008, 12:44 PM #1
Member
- Join Date
- Oct 2008
- Posts
- 4
- Rep Power
- 0
- 10-24-2008, 03:28 PM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Can you explain your question little more clear.
You want to create some arrays and then you want to add those arrays into a linked list and then you want to add those link list to string buffer, is it?
- 10-24-2008, 08:33 PM #3
Some ideas on the design. Do it in simple steps first. Then make it more complicated.
Create an array to hold strings as they are appended. Don't worry about overflow yet. That's part 2.
Increment length as strings are appended.
Write a toString method that creates a StringBuffer and fills it from what's been stored in the array. Create and return a String from the StringBuffer.
Get that to work, write a small main() method to test it,
then move on the making a linked list of these arrays.
- 10-24-2008, 09:55 PM #4
I was refering to what the above would return? Yes it would be a variable with the total number of chars in all the string stored. Has nothing to do with overflow in my design.public int length();
- 10-24-2008, 11:06 PM #5
Just another cross poster.
New To Java - NonAllocating StringBuffer Help
db
- 10-25-2008, 06:57 AM #6
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
If you want to handle the overflow in dynamic incrementing of number of element, you have to choose another collection framework, may be ArrayList would be the solution.
Similar Threads
-
how to redirect the output buffer of pl/sql onto a jsp
By sriavr in forum JDBCReplies: 0Last Post: 03-11-2008, 12:25 PM -
Trouble with Buffer Sizing
By Jeff in forum New To JavaReplies: 3Last Post: 02-07-2008, 01:43 PM -
Http Buffer issue... chunked?
By jlew in forum NetworkingReplies: 1Last Post: 11-04-2007, 05:45 PM -
Help with String Buffer
By mathias in forum AWT / SwingReplies: 1Last Post: 08-07-2007, 06:52 AM -
how to set the value of BUFFER SIZE
By oregon in forum Advanced JavaReplies: 1Last Post: 08-06-2007, 03:16 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks