< prev index next >
src/java.desktop/share/classes/com/sun/media/sound/StandardMidiFileWriter.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -72,11 +72,11 @@
private DataOutputStream tddos; // data output stream for track writing
/**
* MIDI parser types.
*/
- private static final int types[] = {
+ private static final int[] types = {
MIDI_TYPE_0,
MIDI_TYPE_1
};
@Override
@@ -94,12 +94,12 @@
* @return array of file types. If no file types are supported,
* returns an array of length 0.
*/
@Override
public int[] getMidiFileTypes(Sequence sequence){
- int typesArray[];
- Track tracks[] = sequence.getTracks();
+ int[] typesArray;
+ Track[] tracks = sequence.getTracks();
if( tracks.length==1 ) {
typesArray = new int[2];
typesArray[0] = MIDI_TYPE_0;
typesArray[1] = MIDI_TYPE_1;
@@ -147,22 +147,22 @@
}
//=================================================================================
private InputStream getFileStream(int type, Sequence sequence) throws IOException {
- Track tracks[] = sequence.getTracks();
+ Track[] tracks = sequence.getTracks();
int bytesBuilt = 0;
int headerLength = 14;
int length = 0;
int timeFormat;
float divtype;
PipedOutputStream hpos = null;
DataOutputStream hdos = null;
PipedInputStream headerStream = null;
- InputStream trackStreams [] = null;
+ InputStream[] trackStreams = null;
InputStream trackStream = null;
InputStream fStream = null;
// Determine the filetype to write
if( type==MIDI_TYPE_0 ) {
@@ -342,11 +342,11 @@
int status;
int eventtype;
int metatype;
int data1, data2;
int length;
- byte data[] = null;
+ byte[] data = null;
ShortMessage shortMessage = null;
MetaMessage metaMessage = null;
SysexMessage sysexMessage = null;
// get the tick
< prev index next >