brut.androlib.res.decoder
Class StringBlock

java.lang.Object
  extended by brut.androlib.res.decoder.StringBlock

public class StringBlock
extends Object

Author:
Ryszard Wiśniewski , Dmitry Skiba Block of strings, used in binary xml and arsc. TODO: - implement get()

Method Summary
 int find(String string)
          Finds index of the string.
 CharSequence get(int index)
          Not yet implemented.
 int getCount()
          Returns number of strings in block.
 String getHTML(int index)
          Returns string with style tags (html-like).
 String getString(int index)
          Returns raw string (without any styling information) at specified index.
static StringBlock read(ExtDataInput reader)
          Reads whole (including chunk type) string block from stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

read

public static StringBlock read(ExtDataInput reader)
                        throws IOException
Reads whole (including chunk type) string block from stream. Stream must be at the chunk type.

Throws:
IOException

getCount

public int getCount()
Returns number of strings in block.


getString

public String getString(int index)
Returns raw string (without any styling information) at specified index.


get

public CharSequence get(int index)
Not yet implemented. Returns string with style information (if any).


getHTML

public String getHTML(int index)
Returns string with style tags (html-like).


find

public int find(String string)
Finds index of the string. Returns -1 if the string was not found.



Copyright © 2012. All Rights Reserved.