net.sourceforge.jtds.jdbc
Class JtdsReader

java.lang.Object
  |
  +--java.io.Reader
        |
        +--net.sourceforge.jtds.jdbc.JtdsReader

public class JtdsReader
extends java.io.Reader

This class implements a Reader populated with data returned by the READTEXT command for text and ntext columns.

Version:
$Id: JtdsReader.java,v 1.6 2004/08/24 21:47:39 bheineman Exp $
Author:
Mike Hutchinson.

Field Summary
private  char[] buffer
           
private static int BUFSIZE
           
private  java.lang.String charset
           
private  java.lang.String colName
           
private  int length
           
private  int offset
           
private  int pos
           
private  java.lang.String tabName
           
private  TdsCore tds
           
private  TextPtr textPtr
           
 
Fields inherited from class java.io.Reader
lock, maxSkipBufferSize, skipBuffer
 
Constructor Summary
(package private) JtdsReader(ConnectionJDBC2 con, ColInfo ci, TextPtr textPtr, java.lang.String charset)
          Construct a new InputStream.
 
Method Summary
(package private)  int available()
           
 void close()
           
(package private)  void fillBuffer()
          Invoke READTEXT to obtain the next block of data from the server.
(package private)  int getLength()
           
 int read()
           
 int read(char[] buf, int off, int len)
           
 void reset()
          Resets the stream so that the data may be read from the begining.
 
Methods inherited from class java.io.Reader
mark, markSupported, read, ready, skip
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

tds

private TdsCore tds

length

private int length

offset

private int offset

colName

private java.lang.String colName

tabName

private java.lang.String tabName

textPtr

private TextPtr textPtr

BUFSIZE

private static final int BUFSIZE

buffer

private char[] buffer

pos

private int pos

charset

private java.lang.String charset
Constructor Detail

JtdsReader

JtdsReader(ConnectionJDBC2 con,
           ColInfo ci,
           TextPtr textPtr,
           java.lang.String charset)
     throws java.sql.SQLException
Construct a new InputStream.
Parameters:
con - The parent connection object.
ci - The descriptor for the text or image column.
textPtr - The textpointer.
charset - The character set for converting strings to bytes.
Throws:
java.sql.SQLException -  
Method Detail

available

int available()

getLength

int getLength()

reset

public void reset()
           throws java.io.IOException
Resets the stream so that the data may be read from the begining.
Overrides:
reset in class java.io.Reader

fillBuffer

void fillBuffer()
          throws java.sql.SQLException
Invoke READTEXT to obtain the next block of data from the server.
Throws:
java.sql.SQLException -  

read

public int read()
         throws java.io.IOException
Overrides:
read in class java.io.Reader

close

public void close()
           throws java.io.IOException
Overrides:
close in class java.io.Reader

read

public int read(char[] buf,
                int off,
                int len)
         throws java.io.IOException
Overrides:
read in class java.io.Reader


Generated on April 15 2005