Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
What Is jxl.jar 2.6.12
What is jxl.jar 2.6.12?
✍: fyicenter.com
jxl.jar 2.6.12 is the JAR file for Java Excel API 2.6.12,
which is a Java library for reading, writing and
modifying Microsoft Excel spreadsheet files.
JAR File Size and Download Location:
JAR name: jxl-2.6.12.jar Target JDK version: 1.6 Dependency: None File name: jxl.jar File size: 725735 bytes Release date: 24-Oct-2009 Download: Java Excel API Website.
Here are Java Source Code files for jxl-2.6.12.jar:
⏎ jxl/biff/WritableRecordData.java
/*********************************************************************
*
* Copyright (C) 2002 Andrew Khan
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
import jxl.common.Logger;
import jxl.read.biff.Record;
/**
* Extension of the standard RecordData which is used to support those
* records which, once read, may also be written
*/
public abstract class WritableRecordData extends RecordData
implements ByteData
{
/**
* The logger
*/
private static Logger logger = Logger.getLogger(WritableRecordData.class);
/**
* The maximum length allowed by Excel for any record length
*/
protected static final int maxRecordLength = 8228;
/**
* Constructor used by the writable records
*
* @param t the biff type of this record
*/
protected WritableRecordData(Type t)
{
super(t);
}
/**
* Constructor used when reading a record
*
* @param t the raw data read from the biff file
*/
protected WritableRecordData(Record t)
{
super(t);
}
/**
* Used when writing out records. This portion of the method handles the
* biff code and the length of the record and appends on the data retrieved
* from the subclasses
*
* @return the full record data to be written out to the compound file
*/
public final byte[] getBytes()
{
byte[] data = getData();
int dataLength = data.length;
// Don't the call the automatic continuation code for now
// Assert.verify(dataLength <= maxRecordLength - 4);
// If the bytes length is greater than the max record length
// then split out the data set into continue records
if (data.length > maxRecordLength - 4)
{
dataLength = maxRecordLength - 4;
data = handleContinueRecords(data);
}
byte[] bytes = new byte[data.length + 4];
System.arraycopy(data, 0, bytes, 4, data.length);
IntegerHelper.getTwoBytes(getCode(), bytes, 0);
IntegerHelper.getTwoBytes(dataLength, bytes, 2);
return bytes;
}
/**
* The number of bytes for this record exceeds the maximum record
* length, so a continue is required
* @param data the raw data
* @return the continued data
*/
private byte[] handleContinueRecords(byte[] data)
{
// Deduce the number of continue records
int continuedData = data.length - (maxRecordLength - 4);
int numContinueRecords = continuedData / (maxRecordLength - 4) + 1;
// Create the new byte array, allowing for the continue records
// code and length
byte[] newdata = new byte[data.length + numContinueRecords * 4];
// Copy the bona fide record data into the beginning of the super
// record
System.arraycopy(data, 0, newdata, 0, maxRecordLength - 4);
int oldarraypos = maxRecordLength - 4;
int newarraypos = maxRecordLength - 4;
// Now handle all the continue records
for (int i = 0; i < numContinueRecords; i++)
{
// The number of bytes to add into the new array
int length = Math.min(data.length - oldarraypos, maxRecordLength - 4);
// Add in the continue record code
IntegerHelper.getTwoBytes(Type.CONTINUE.value, newdata, newarraypos);
IntegerHelper.getTwoBytes(length, newdata, newarraypos + 2);
// Copy in as much of the new data as possible
System.arraycopy(data, oldarraypos, newdata, newarraypos + 4, length);
// Update the position counters
oldarraypos += length;
newarraypos += length + 4;
}
return newdata;
}
/**
* Abstract method called by the getBytes method. Subclasses implement
* this method to incorporate their specific binary data - excluding the
* biff code and record length, which is handled by this class
*
* @return subclass specific biff data
*/
protected abstract byte[] getData();
}
⏎ jxl/biff/WritableRecordData.java
Or download all of them as a single archive file:
File name: jxl-2.6.12-src.zip File size: 824057 bytes Release date: 2009-10-24 Download
⇐ What Is jexcelapi_2_6_12.zip
2017-06-09, ≈187🔥, 6💬
Popular Posts:
JDK 17 jdk.xml.dom.jmod is the JMOD file for JDK 17 XML DOM module. JDK 17 XML DOM module compiled c...
What Is javaws.jar in JRE (Java Runtime Environment) 8? javaws.jar in JRE (Java Runtime Environment)...
JDK 17 java.sql.jmod is the JMOD file for JDK 17 SQL (Structured Query Language) module. JDK 17 SQL ...
XML Serializer, Release 2.7.1, allows you to write out XML, HTML etc. as a stream of characters from...
What JAR files are required to run dom\Writer.java provided in the Apache Xerces package? 3 JAR file...