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:
JDK 11 java.xml.jmod - XML Module
JDK 11 java.xml.jmod is the JMOD file for JDK 11 XML (eXtensible Markup Language) module.
JDK 11 XML module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\java.xml.jmod.
JDK 11 XML module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 XML module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\java.xml.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ com/sun/xml/internal/stream/util/BufferAllocator.java
/*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package com.sun.xml.internal.stream.util;
import java.lang.ref.*;
/**
* Buffer allocator for buffers of sizes 128 B, 2 KB and 8 KB. Includes
* methods for allocating and freeing buffers.
*
* @author Binu John
* @author Santiago PericasGeertsen
*/
public class BufferAllocator {
private static final int SMALL_SIZE_LIMIT = 128;
private static final int MEDIUM_SIZE_LIMIT = 2048;
private static final int LARGE_SIZE_LIMIT = 8192;
char[] smallCharBuffer;
char[] mediumCharBuffer;
char[] largeCharBuffer;
byte[] smallByteBuffer;
byte[] mediumByteBuffer;
byte[] largeByteBuffer;
public BufferAllocator() {
}
public char[] getCharBuffer(int size) {
if (size <= SMALL_SIZE_LIMIT) {
char[] buffer = smallCharBuffer;
smallCharBuffer = null;
return buffer;
}
else if (size <= MEDIUM_SIZE_LIMIT) {
char[] buffer = mediumCharBuffer;
mediumCharBuffer = null;
return buffer;
}
else if (size <= LARGE_SIZE_LIMIT) {
char[] buffer = largeCharBuffer;
largeCharBuffer = null;
return buffer;
}
return null;
}
public void returnCharBuffer(char[] c) {
if (c == null) {
return;
}
if (c.length <= SMALL_SIZE_LIMIT) {
smallCharBuffer = c;
}
else if (c.length <= MEDIUM_SIZE_LIMIT) {
mediumCharBuffer = c;
}
else if (c.length <= LARGE_SIZE_LIMIT) {
largeCharBuffer = c;
}
}
public byte[] getByteBuffer(int size) {
if (size <= SMALL_SIZE_LIMIT) {
byte[] buffer = smallByteBuffer;
smallByteBuffer = null;
return buffer;
}
else if (size <= MEDIUM_SIZE_LIMIT) {
byte[] buffer = mediumByteBuffer;
mediumByteBuffer = null;
return buffer;
}
else if (size <= LARGE_SIZE_LIMIT) {
byte[] buffer = largeByteBuffer;
largeByteBuffer = null;
return buffer;
}
return null;
}
public void returnByteBuffer(byte[] b) {
if (b == null) {
return;
}
if (b.length <= SMALL_SIZE_LIMIT) {
smallByteBuffer = b;
}
else if (b.length <= MEDIUM_SIZE_LIMIT) {
mediumByteBuffer = b;
}
else if (b.length <= LARGE_SIZE_LIMIT) {
largeByteBuffer = b;
}
}
}
⏎ com/sun/xml/internal/stream/util/BufferAllocator.java
Or download all of them as a single archive file:
File name: java.xml-11.0.1-src.zip File size: 4876106 bytes Release date: 2018-11-04 Download
⇒ JDK 11 java.xml.crypto.jmod - XML Crypto Module
2020-08-25, ≈692🔥, 0💬
Popular Posts:
commons-io-1.4.jar is the JAR file for Commons IO 1.4, which is a library of utilities to assist wit...
Apache Avalon began in 1999 as the Java Apache Server Framework and in late 2002 separated from the ...
Apache Ant Source Code Files are inside the Apache Ant source package file like apache-ant-1.10.10-s...
Snappy-Java is a Java port of the "snappy", a fast C++ compresser/decompresser developed by Google. ...
JDK 11 jdk.jfr.jmod is the JMOD file for JDK 11 JFR module. JDK 11 JFR module compiled class files a...