예제 #1
0
  public void run() {
    byte[] buf = new byte[32];

    int bytes_read;

    try {
      int b = sbis.read();
      out.write(b);

      while ((bytes_read = sbis.read(buf)) != -1) out.write(buf, 0, bytes_read);

      out.close();
    } catch (IOException e) {
      System.out.println("FAILED: Basic piped stream test: " + e);
    }
  }
예제 #2
0
파일: DB2.java 프로젝트: hilltop919/hilltop
 public void setClobValue(int iindex, String value, PreparedStatement pstmt) throws SQLException {
   if (value == null) value = "";
   StringBufferInputStream sbis = new StringBufferInputStream(value);
   pstmt.setAsciiStream(iindex, sbis, sbis.available());
 }