com.sapportals.portal.prt.util
Class RecyclableStringBuffer
java.lang.Object
com.sapportals.portal.prt.util.RecyclableStringBuffer
public class RecyclableStringBuffer
- extends Object
RecyclableStringBuffer.java Created: Wed Jun 27 11:00:43 2001
RecyclableStringBuffer
public RecyclableStringBuffer()
RecyclableStringBuffer
public RecyclableStringBuffer(int size)
RecyclableStringBuffer
public RecyclableStringBuffer(StringBufferPool pool)
- Parameters:
pool -
reset
public void reset()
realloc
public void realloc(int size)
- Parameters:
size -
getBuffer
public SmartBuffer getBuffer()
- Returns the underlying SmartBuffer object
toString
public String toString()
- Returns the content of the buffer into a String. The value is copied.
- Overrides:
toString in class Object
getSharedString
public SharedString getSharedString()
- Obtains a SharedString Object that shares the same underlying buffer.
From the SharedString object you can obtain the char[] and use it.
The different between this method and getString() is that there is no memory allocation
when SharedString.getChars() is called. This is not the case with this.toString().
- Returns:
- a shared string based on the same internal buffer. Once you get a shared string you must call release on the object
in order to be able to put the buffer in an eventual pool.
The buffer is not back in the pool until all the shared strings have call release and an explicit
release call is made on the pool itself.
This class can be accessed from:
|
SC
|
DC
|
Public Part
|
ACH
|
[sap.com] EP-BASIS-API
|
[sap.com] tc/epbc/prt/api
|
api
|
EP-PIN
|
[sap.com] EP-BASIS-API
|
[sap.com] epbc.prtapi._apideprecated
|
default
|
EP-PIN-PRT
|
[sap.com] EP-BASIS-API
|
[sap.com] tc/epbc/prt/lib/api
|
api
|
EP-PIN
|
Copyright 2011 SAP AG Complete Copyright Notice