You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by mt...@apache.org on 2005/04/15 12:15:28 UTC

cvs commit: jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni File.java

mturk       2005/04/15 03:15:28

  Modified:    jni/java/org/apache/tomcat/jni File.java
  Log:
  Use negative values for errors instead throwing exeptions.
  
  Revision  Changes    Path
  1.3       +8 -15     jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/File.java
  
  Index: File.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/File.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- File.java	14 Jan 2005 14:42:37 -0000	1.2
  +++ File.java	15 Apr 2005 10:15:28 -0000	1.3
  @@ -349,8 +349,7 @@
        * @param nbytes The number of bytes to write; (-1) for full array.
        * @return The number of bytes written.
        */
  -    public static native int write(long thefile, byte[] buf, int nbytes)
  -        throws Error;
  +    public static native int write(long thefile, byte[] buf, int offset, int nbytes);
   
       /**
        * Write data to the specified file, ensuring that all of the data is
  @@ -372,9 +371,7 @@
        * @param nbytes The number of bytes to write; (-1) for full array.
        * @return The number of bytes written.
        */
  -    public static native int writeFull(long thefile, byte[] buf, int nbytes)
  -        throws Error;
  -
  +    public static native int writeFull(long thefile, byte[] buf, int offset, int nbytes);
   
       /**
        * Write data from aray of byte arrays to the specified file.
  @@ -388,8 +385,7 @@
        * @param vec The array from which to get the data to write to the file.
        * @return The number of bytes written.
        */
  -    public static native int writev(long thefile, byte[][] vec)
  -        throws Error;
  +    public static native int writev(long thefile, byte[][] vec);
   
       /**
        * Write data from aray of byte arrays to the specified file,
  @@ -401,8 +397,7 @@
        * @param vec The array from which to get the data to write to the file.
        * @return The number of bytes written.
        */
  -    public static native int writevFull(long thefile, byte[][] vec)
  -        throws Error;
  +    public static native int writevFull(long thefile, byte[][] vec);
   
       /**
        * Read data from the specified file.
  @@ -421,8 +416,7 @@
        * @param nbytes The number of bytes to read (-1) for full array.
        * @return the number of bytes read.
        */
  -    public static native int read(long thefile, byte[] buf, int nbytes)
  -        throws Error;
  +    public static native int read(long thefile, byte[] buf,  int offset, int nbytes);
   
       /**
        * Read data from the specified file, ensuring that the buffer is filled
  @@ -444,8 +438,7 @@
        * @param nbytes The number of bytes to read (-1) for full array.
        * @return the number of bytes read.
        */
  -    public static native int readFull(long thefile, byte[] buf, int nbytes)
  -        throws Error;
  +    public static native int readFull(long thefile, byte[] buf,  int offset, int nbytes);
   
       /**
        * Read a string from the specified file.
  @@ -453,7 +446,7 @@
        * @param buf The buffer to store the string in.
        * @param thefile The file descriptor to read from
        */
  -    public static native int gets(byte[] buf, long thefile);
  +    public static native int gets(byte[] buf,  int offset, long thefile);
   
   
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org