• Post Reply Bookmark Topic Watch Topic
  • New Topic

Vector and StringBuffer  RSS feed

 
Kalai Selvi
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have added 6 vectors to a stringbuffer in a function, which returns the stringbuffer.

In the called method, i need to get the vectors back from the stringbuffer. How do i get the vectors from the stringbuffer?
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's a function?

Could you give us a snippet of code to show us what you're trying to do?

Have you put a bunch of StringBuffer instances into a Vector, or are you putting Vectors into a StringBuffer?

Maybe we can help you out if we can see a quick code snippet?

-Cameron McKenzie
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16057
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess that you really mean "method" when you say "function".

A StringBuffer is an object that is used to efficiently create strings. It is not a general purpose container class in which you can store objects such as Vectors, so that you can later retrieve them. There is no straightforward way to add a Vector to a StringBuffer or retrieving Vectors (or any other kind of objects) from a StringBuffer. Show us your code, that will make it more clear what you mean exactly and what you're trying to accomplish.
[ February 15, 2008: Message edited by: Jesper Young ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!