XMLDecoder problem (original) (raw)
I have the following code in my servlet:
InputStream inp = rs.getBinaryStream("cells");
try{
// BufferedReader reader = new BufferedReader(new InputStreamReader(inp));
// while (reader.ready()) System.err.println(reader.readLine());
XMLDecoder decoder = new XMLDecoder(new BufferedInputStream(inp));
CellBean[][] cells = (CellBean[][]) decoder.readObject();
grid.setCells(cells);
decoder.close();
}
catch(Exception ex){
// do smth
}
First time i call servlet, decoder.readObject() returns null. Next calls successfully return an array of CellBeans. When i tried to uncomment the lines with reader, it returned me xml for my array, so I'm sure the problem is in XMLDecoder. What the hell is going on with it?
I'm following this tutorial on the netbeans website for a simpleEE7App. I followed the instructions precisely but got an exception need help. :/…
anyone here?
It seems that you can override a concrete method and make it abstract. I actually came across some code that did this, so I had to check how it…
I'm following this tutorial on the netbeans website for a simpleEE7App. I followed the instructions precisely but got an exception need help. :/…
anyone here?
It seems that you can override a concrete method and make it abstract. I actually came across some code that did this, so I had to check how it…