📄 shapefilereader.html
字号:
</TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileReader.html#goTo(int)">goTo</A></B>(int offset)</CODE><BR> Needs better data, what is the requirements for offset?</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileReader.html#hasNext()">hasNext</A></B>()</CODE><BR> If there exists another record. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileReader.html#main(java.lang.String[])">main</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] args)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileReader.Record.html" title="class in org.geotools.data.shapefile.shp">ShapefileReader.Record</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileReader.html#nextRecord()">nextRecord</A></B>()</CODE><BR> Fetch the next record information.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileHeader.html" title="class in org.geotools.data.shapefile.shp">ShapefileHeader</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileReader.html#readHeader(java.nio.channels.ReadableByteChannel, boolean)">readHeader</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/nio/channels/ReadableByteChannel.html" title="class or interface in java.nio.channels">ReadableByteChannel</A> channel, boolean strict)</CODE><BR> A short cut for reading the header from the given channel.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileReader.Record.html" title="class in org.geotools.data.shapefile.shp">ShapefileReader.Record</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileReader.html#recordAt(int)">recordAt</A></B>(int offset)</CODE><BR> Sets the current location of the byteStream to offset and returns the next record. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileReader.html#setHandler(org.geotools.data.shapefile.shp.ShapeHandler)">setHandler</A></B>(<A HREF="../../../../../org/geotools/data/shapefile/shp/ShapeHandler.html" title="interface in org.geotools.data.shapefile.shp">ShapeHandler</A> handler)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileReader.html#shapeAt(int)">shapeAt</A></B>(int offset)</CODE><BR> TODO needs better java docs!!! </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileReader.html#supportsRandomAccess()">supportsRandomAccess</A></B>()</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileReader.html#transferTo(org.geotools.data.shapefile.shp.ShapefileWriter, int, double[])">transferTo</A></B>(<A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileWriter.html" title="class in org.geotools.data.shapefile.shp">ShapefileWriter</A> writer, int recordNum, double[] bounds)</CODE><BR> Transfer (by bytes) the data at the current record to the ShapefileWriter.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="ShapefileReader(java.nio.channels.ReadableByteChannel, boolean, boolean, org.geotools.data.shapefile.Lock)"><!-- --></A><H3>ShapefileReader</H3><PRE>public <B>ShapefileReader</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/nio/channels/ReadableByteChannel.html" title="class or interface in java.nio.channels">ReadableByteChannel</A> channel, boolean strict, boolean useMemoryMapped, <A HREF="../../../../../org/geotools/data/shapefile/Lock.html" title="class in org.geotools.data.shapefile">Lock</A> lock) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A>, <A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileException.html" title="class in org.geotools.data.shapefile.shp">ShapefileException</A></PRE><DL><DD>Creates a new instance of ShapeFile.<P><DT><B>Parameters:</B><DD><CODE>channel</CODE> - The ReadableByteChannel this reader will use.<DD><CODE>strict</CODE> - True to make the header parsing throw Exceptions if the version or magic number are incorrect.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - If problems arise.<DD><CODE><A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileException.html" title="class in org.geotools.data.shapefile.shp">ShapefileException</A></CODE> - If for some reason the file contains invalid records.</DL><HR><A NAME="ShapefileReader(java.nio.channels.ReadableByteChannel, org.geotools.data.shapefile.Lock)"><!-- --></A><H3>ShapefileReader</H3><PRE>public <B>ShapefileReader</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/nio/channels/ReadableByteChannel.html" title="class or interface in java.nio.channels">ReadableByteChannel</A> channel, <A HREF="../../../../../org/geotools/data/shapefile/Lock.html" title="class in org.geotools.data.shapefile">Lock</A> lock) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A>, <A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileException.html" title="class in org.geotools.data.shapefile.shp">ShapefileException</A></PRE><DL><DD>Default constructor. Calls ShapefileReader(channel,true).<P><DT><B>Parameters:</B><DD><CODE>channel</CODE> - <DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE><DD><CODE><A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileException.html" title="class in org.geotools.data.shapefile.shp">ShapefileException</A></CODE></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="readHeader(java.nio.channels.ReadableByteChannel, boolean)"><!-- --></A><H3>readHeader</H3><PRE>public static <A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileHeader.html" title="class in org.geotools.data.shapefile.shp">ShapefileHeader</A> <B>readHeader</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/nio/channels/ReadableByteChannel.html" title="class or interface in java.nio.channels">ReadableByteChannel</A> channel, boolean strict) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE><DL><DD>A short cut for reading the header from the given channel.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>channel</CODE> - The channel to read from.<DD><CODE>strict</CODE> - True to make the header parsing throw Exceptions if the version or magic number are incorrect.<DT><B>Returns:</B><DD>A ShapefileHeader object.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - If problems arise.</DL></DD></DL><HR><A NAME="ensureCapacity(java.nio.ByteBuffer, int, boolean)"><!-- --></A><H3>ensureCapacity</H3><PRE>public static <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/nio/ByteBuffer.html" title="class or interface in java.nio">ByteBuffer</A> <B>ensureCapacity</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/nio/ByteBuffer.html" title="class or interface in java.nio">ByteBuffer</A> buffer, int size, boolean useMemoryMappedBuffer)</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="fill(java.nio.ByteBuffer, java.nio.channels.ReadableByteChannel)"><!-- --></A><H3>fill</H3><PRE>public static int <B>fill</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/nio/ByteBuffer.html" title="class or interface in java.nio">ByteBuffer</A> buffer, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/nio/channels/ReadableByteChannel.html" title="class or interface in java.nio.channels">ReadableByteChannel</A> channel) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE><DL><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL></DD></DL><HR><A NAME="getHeader()"><!-- --></A><H3>getHeader</H3><PRE>public <A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileHeader.html" title="class in org.geotools.data.shapefile.shp">ShapefileHeader</A> <B>getHeader</B>()</PRE><DL><DD>Get the header. Its parsed in the constructor.<P><DD><DL><DT><B>Returns:</B><DD>The header that is associated with this file.</DL></DD></DL><HR><A NAME="close()"><!-- --></A><H3>close</H3><PRE>public void <B>close</B>() throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE><DL><DD>Clean up any resources. Closes the channel.<P><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - If errors occur while closing the channel.</DL></DD></DL><HR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -