Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
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 (309)
Collections:
Other Resources:
JDK 11 java.desktop.jmod - Desktop Module
JDK 11 java.desktop.jmod is the JMOD file for JDK 11 Desktop module.
JDK 11 Desktop module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\java.desktop.jmod.
JDK 11 Desktop module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 Desktop module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\java.desktop.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ com/sun/media/sound/WaveFloatFileWriter.java
/* * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package com.sun.media.sound; import java.io.File; import java.io.IOException; import java.io.OutputStream; import java.util.Objects; import javax.sound.sampled.AudioFileFormat; import javax.sound.sampled.AudioFileFormat.Type; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioFormat.Encoding; import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.spi.AudioFileWriter; /** * Floating-point encoded (format 3) WAVE file writer. * * @author Karl Helgason */ public final class WaveFloatFileWriter extends AudioFileWriter { @Override public Type[] getAudioFileTypes() { return new Type[]{Type.WAVE}; } @Override public Type[] getAudioFileTypes(AudioInputStream stream) { if (!stream.getFormat().getEncoding().equals(Encoding.PCM_FLOAT)) return new Type[0]; return new Type[] { Type.WAVE }; } private void checkFormat(AudioFileFormat.Type type, AudioInputStream stream) { if (!Type.WAVE.equals(type)) throw new IllegalArgumentException("File type " + type + " not supported."); if (!stream.getFormat().getEncoding().equals(Encoding.PCM_FLOAT)) throw new IllegalArgumentException("File format " + stream.getFormat() + " not supported."); } public void write(AudioInputStream stream, RIFFWriter writer) throws IOException { try (final RIFFWriter fmt_chunk = writer.writeChunk("fmt ")) { AudioFormat format = stream.getFormat(); fmt_chunk.writeUnsignedShort(3); // WAVE_FORMAT_IEEE_FLOAT fmt_chunk.writeUnsignedShort(format.getChannels()); fmt_chunk.writeUnsignedInt((int) format.getSampleRate()); fmt_chunk.writeUnsignedInt(((int) format.getFrameRate()) * format.getFrameSize()); fmt_chunk.writeUnsignedShort(format.getFrameSize()); fmt_chunk.writeUnsignedShort(format.getSampleSizeInBits()); } try (RIFFWriter data_chunk = writer.writeChunk("data")) { byte[] buff = new byte[1024]; int len; while ((len = stream.read(buff, 0, buff.length)) != -1) { data_chunk.write(buff, 0, len); } } } private static final class NoCloseOutputStream extends OutputStream { final OutputStream out; NoCloseOutputStream(OutputStream out) { this.out = out; } @Override public void write(int b) throws IOException { out.write(b); } @Override public void flush() throws IOException { out.flush(); } @Override public void write(byte[] b, int off, int len) throws IOException { out.write(b, off, len); } @Override public void write(byte[] b) throws IOException { out.write(b); } } private AudioInputStream toLittleEndian(AudioInputStream ais) { AudioFormat format = ais.getFormat(); AudioFormat targetFormat = new AudioFormat(format.getEncoding(), format .getSampleRate(), format.getSampleSizeInBits(), format .getChannels(), format.getFrameSize(), format.getFrameRate(), false); return AudioSystem.getAudioInputStream(targetFormat, ais); } @Override public int write(AudioInputStream stream, Type fileType, OutputStream out) throws IOException { Objects.requireNonNull(stream); Objects.requireNonNull(fileType); Objects.requireNonNull(out); checkFormat(fileType, stream); if (stream.getFormat().isBigEndian()) stream = toLittleEndian(stream); try (final RIFFWriter writer = new RIFFWriter( new NoCloseOutputStream(out), "WAVE")) { write(stream, writer); return (int) writer.getFilePointer(); } } @Override public int write(AudioInputStream stream, Type fileType, File out) throws IOException { Objects.requireNonNull(stream); Objects.requireNonNull(fileType); Objects.requireNonNull(out); checkFormat(fileType, stream); if (stream.getFormat().isBigEndian()) stream = toLittleEndian(stream); try (final RIFFWriter writer = new RIFFWriter(out, "WAVE")) { write(stream, writer); return (int) writer.getFilePointer(); } } }
⏎ com/sun/media/sound/WaveFloatFileWriter.java
Or download all of them as a single archive file:
File name: java.desktop-11.0.1-src.zip File size: 7974380 bytes Release date: 2018-11-04 Download
⇒ JDK 11 java.instrument.jmod - Instrument Module
2022-08-06, 192882👍, 5💬
Popular Posts:
If you are a Java developer, it is very often that you need to use some 3rd party libraries to perfo...
JDK 11 jdk.dynalink.jmod is the JMOD file for JDK 11 Dynamic Linking module. JDK 11 Dynamic Linking ...
Apache Ant Source Code Files are inside the Apache Ant source package file like apache-ant-1.10.10-s...
itextpdf.jar is a component in iText 5 Java library to provide core functionalities. iText Java libr...
ANTLR is a powerful parser generator for multiple programming languages including Java. ANTLR contai...