Update of /cvsroot/xdoclet/xdoclet/modules/jdo/src/xdoclet/modules/jdo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7803/modules/jdo/src/xdoclet/modules/jdo
Modified Files: JdoObjectIdGeneratorTagsHandler.java Log Message: - replaced java.nio.CharBuffer by java-1.4-compliant classes - added support of inheritance strategy "subclass-table" (previous "no-table" is still supported) Index: JdoObjectIdGeneratorTagsHandler.java =================================================================== RCS file: /cvsroot/xdoclet/xdoclet/modules/jdo/src/xdoclet/modules/jdo/JdoObjectIdGeneratorTagsHandler.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** JdoObjectIdGeneratorTagsHandler.java 31 Aug 2005 19:47:00 -0000 1.5 --- JdoObjectIdGeneratorTagsHandler.java 9 Oct 2005 21:38:15 -0000 1.6 *************** *** 5,12 **** package xdoclet.modules.jdo; import java.io.File; import java.io.FileReader; - import java.io.Reader; - import java.nio.CharBuffer; import java.util.ArrayList; import java.util.Collections; --- 5,11 ---- package xdoclet.modules.jdo; + import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.util.ArrayList; import java.util.Collections; *************** *** 21,25 **** import org.apache.commons.logging.Log; - import xjavadoc.SourceClass; import xjavadoc.XClass; --- 20,23 ---- *************** *** 419,442 **** throw new XDocletException("File \"" + includeFile.getAbsolutePath() + "\" is too big!"); ! CharBuffer buf = CharBuffer.allocate((int) includeFile.length()); try { ! ! Reader r = new FileReader(includeFile); try { ! r.read(buf); } finally { ! r.close(); } - } catch (Exception x) { ! throw new XDocletException(x, "Reading include file failed!"); } - - buf.flip(); return buf.toString(); } } --- 417,469 ---- throw new XDocletException("File \"" + includeFile.getAbsolutePath() + "\" is too big!"); ! StringBuffer buf = new StringBuffer((int) includeFile.length()); try { ! FileReader fr = new FileReader(includeFile); try { ! BufferedReader r = new BufferedReader(fr); ! ! try { ! char[] c = new char[100]; ! int bytesRead; ! ! while ((bytesRead = r.read(c)) >= 0) { ! buf.append(c, 0, bytesRead); ! // System.out.println("read " + bytesRead + " bytes from file " + includeFile.getAbsolutePath()); ! } ! } ! finally { ! r.close(); ! } } finally { ! fr.close(); } } catch (Exception x) { ! throw new XDocletException(x, "Reading include file \"" + includeFile.getAbsolutePath() + "\" failed!"); } return buf.toString(); + // CharBuffer buf = CharBuffer.allocate((int) includeFile.length()); + // + // try { + // + // Reader r = new FileReader(includeFile); + // + // try { + // r.read(buf); + // } + // finally { + // r.close(); + // } + // + // } + // catch (Exception x) { + // throw new XDocletException(x, "Reading include file failed!"); + // } + // + // buf.flip(); + // return buf.toString(); } } ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ xdoclet-devel mailing list xdoclet-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xdoclet-devel