Name: dbT83986 Date: 03/05/99
java.io.StringBufferInputStream is deprecated. In the API docs,
the class java.io.StringReader is referenced. But how to convert
this to an InputStream? I need one for PreparedStatement.setAsciiStream:
java.sql.PreparedStatement ps = _connection.prepareStatement(update);
String sval = (String)value;
java.io.StringBufferInputStream sbis = new java.io.StringBufferInputStream(sval);
ps.setAsciiStream(1,sbis,sval.length()); //1 = first ?
result = ps.executeUpdate();
ps.close();
Like most other deprecated things, the java.io.java.io.StringBufferInputStream
should also have an example how to replace it 1:1
(Review ID: 54538)
======================================================================
- duplicates
-
JDK-4094886 Need a load(Reader)/store(Writer) interface for Properties class
-
- Closed
-