cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sylv...@apache.org
Subject cvs commit: xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/source BlobSource.java
Date Sun, 01 Dec 2002 21:19:58 GMT
sylvain     2002/12/01 13:19:58

  Modified:    src/scratchpad/src/org/apache/cocoon/components/source Tag:
                        cocoon_2_0_3_branch BlobSource.java
  Log:
  Handle more column types
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.2.2.1   +9 -4      xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/source/BlobSource.java
  
  Index: BlobSource.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/source/BlobSource.java,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- BlobSource.java	3 Apr 2002 12:22:11 -0000	1.2
  +++ BlobSource.java	1 Dec 2002 21:19:58 -0000	1.2.2.1
  @@ -120,7 +120,7 @@
           if (!url.startsWith("blob:/")) {
               throw new MalformedURLException("Malformed url for a blob source : " + url);
           }
  -        
  +
           this.systemId = url;
           
           // Parse the url
  @@ -202,9 +202,9 @@
               
               ResultSet rs = stmt.executeQuery(select);
               rs.next();
  -            
  +
               int colType = rs.getMetaData().getColumnType(1);
  -            
  +
               switch(colType) {
                   case Types.BLOB :
                       Blob blob = rs.getBlob(1);
  @@ -216,6 +216,11 @@
                       return new JDBCInputStream(clob.getAsciiStream(), cnx);
                   //break;
                   
  +                case Types.LONGVARBINARY :
  +                case Types.VARBINARY :
  +                    return new JDBCInputStream(rs.getBinaryStream(1), cnx);
  +                //break;
  +              	
                   default :
                       String value = rs.getString(1);
                       stmt.close();
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message