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/EncodedURLHelper.java
/*********************************************************************
*
* Copyright (C) 2005 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.WorkbookSettings;
/**
* Helper to get the Microsoft encoded URL from the given string
*/
public class EncodedURLHelper
{
/**
* The logger
*/
private static Logger logger = Logger.getLogger(EncodedURLHelper.class);
// The control codes
private static byte msDosDriveLetter = 0x01;
private static byte sameDrive = 0x02;
private static byte endOfSubdirectory = 0x03;
private static byte parentDirectory = 0x04;
private static byte unencodedUrl = 0x05;
public static byte[] getEncodedURL(String s, WorkbookSettings ws)
{
if (s.startsWith("http:"))
{
return getURL(s, ws);
}
else
{
return getFile(s, ws);
}
}
private static byte[] getFile(String s, WorkbookSettings ws)
{
ByteArray byteArray = new ByteArray();
int pos = 0;
if (s.charAt(1) == ':')
{
// we have a drive letter
byteArray.add(msDosDriveLetter);
byteArray.add((byte) s.charAt(0));
pos = 2;
}
else if (s.charAt(pos) == '\\' ||
s.charAt(pos) == '/')
{
byteArray.add(sameDrive);
}
while (s.charAt(pos) == '\\' ||
s.charAt(pos) == '/')
{
pos++;
}
while (pos < s.length())
{
int nextSepIndex1 = s.indexOf('/', pos);
int nextSepIndex2 = s.indexOf('\\', pos);
int nextSepIndex = 0;
String nextFileNameComponent = null;
if (nextSepIndex1 != -1 && nextSepIndex2 != -1)
{
// choose the smallest (ie. nearest) separator
nextSepIndex = Math.min(nextSepIndex1, nextSepIndex2);
}
else if (nextSepIndex1 == -1 || nextSepIndex2 == -1)
{
// chose the maximum separator
nextSepIndex = Math.max(nextSepIndex1, nextSepIndex2);
}
if (nextSepIndex == -1)
{
// no more separators
nextFileNameComponent = s.substring(pos);
pos = s.length();
}
else
{
nextFileNameComponent = s.substring(pos, nextSepIndex);
pos = nextSepIndex + 1;
}
if (nextFileNameComponent.equals("."))
{
// current directory - do nothing
}
else if (nextFileNameComponent.equals(".."))
{
// parent directory
byteArray.add(parentDirectory);
}
else
{
// add the filename component
byteArray.add(StringHelper.getBytes(nextFileNameComponent,
ws));
}
if (pos < s.length())
{
byteArray.add(endOfSubdirectory);
}
}
return byteArray.getBytes();
}
private static byte[] getURL(String s, WorkbookSettings ws)
{
ByteArray byteArray = new ByteArray();
byteArray.add(unencodedUrl);
byteArray.add((byte) s.length());
byteArray.add(StringHelper.getBytes(s, ws));
return byteArray.getBytes();
}
}
⏎ jxl/biff/EncodedURLHelper.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, ≈144🔥, 6💬
Popular Posts:
JDK 17 java.xml.jmod is the JMOD file for JDK 17 XML (eXtensible Markup Language) module. JDK 17 XML...
Apache Log4j API provides the interface that applications should code to and provides the adapter co...
itextpdf.jar is a component in iText 5 Java library to provide core functionalities. iText Java libr...
This package is the backport of java.util.concurrent API, introduced in Java 5.0 and further refined...
How to download and install ojdbc11.jar for Oracle 21c? ojdbc11.jar for Oracle 21c is a Java JDBC Dr...