I'm requesting data from my server and receive a string in the form of 2|bit.ly|1||1|
and |
should be the seperator.
I though the following piece of code should do the work
BufferedReader br = null;
...
br = new BufferedReader(new InputStreamReader(inputStream));
...
String line;
String[] columns;
ContentValues values;
while((line = br.readLine())!=null) {
columns = line.split("|");
...
}
but after the line.split("|");
the colums contains 15 elements instead of expected 6. Taking a closer look at it's content reveals that each character in the string was stored in one array element.
Anyone having an idea, what's wrong with it? The code coming from server isn't encoded in any way in in the example I use only ASCII characters appear.