Package com.opensymphony.module.sitemesh
Class SitemeshBufferFragment
java.lang.Object
com.opensymphony.module.sitemesh.SitemeshBufferFragment
A fragment of a sitemesh buffer. This includes a start and a length, and may contain a list of deleted sections of
the buffer.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder for fragments. -
Constructor Summary
ConstructorsConstructorDescriptionSitemeshBufferFragment(SitemeshBuffer buffer, int start, int length) SitemeshBufferFragment(SitemeshBuffer buffer, int start, int length, TreeMap<Integer, Integer> deletions) Create a sitemesh buffer fragment -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder(SitemeshBufferFragment fragment) intintgetStart()intGet the total length of the fragment, taking deletions and chained buffers of the buffertoString()voidWrite the fragment to the given writer
-
Constructor Details
-
SitemeshBufferFragment
-
SitemeshBufferFragment
public SitemeshBufferFragment(SitemeshBuffer buffer, int start, int length, TreeMap<Integer, Integer> deletions) Create a sitemesh buffer fragment- Parameters:
buffer- The buffer that this is a fragment ofstart- The start of the fragmentlength- The length of the fragmentdeletions- Deleted parts of the fragment, as a map of positions to the length to be deleted.
-
-
Method Details
-
writeTo
Write the fragment to the given writer- Parameters:
writer- The writer to write the fragment to- Throws:
IOException- If an error occured
-
getTotalLength
public int getTotalLength()Get the total length of the fragment, taking deletions and chained buffers of the buffer- Returns:
- The total length of the fragment
-
getStringContent
-
toString
-
getStart
public int getStart() -
getLength
public int getLength() -
builder
-
builder
-