< prev index next >

src/java.desktop/share/classes/javax/sound/midi/spi/MidiFileWriter.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1999, 2014, 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 --- 1,7 ---- /* ! * Copyright (c) 1999, 2015, 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
*** 56,65 **** --- 56,66 ---- * * @param sequence the sequence for which MIDI file type support is * queried * @return array of file types. If no file types are supported, returns an * array of length 0. + * @throws NullPointerException if {@code sequence} is {@code null} */ public abstract int[] getMidiFileTypes(Sequence sequence); /** * Indicates whether file writing support for the specified MIDI file type
*** 86,95 **** --- 87,97 ---- * * @param fileType the file type for which write capabilities are queried * @param sequence the sequence for which file writing support is queried * @return {@code true} if the file type is supported for this sequence, * otherwise {@code false} + * @throws NullPointerException if {@code sequence} is {@code null} */ public boolean isFileTypeSupported(int fileType, Sequence sequence) { int types[] = getMidiFileTypes( sequence ); for(int i=0; i<types.length; i++) {
*** 109,118 **** --- 111,122 ---- * @param out stream to which the file data should be written * @return the number of bytes written to the output stream * @throws IOException if an I/O exception occurs * @throws IllegalArgumentException if the file type is not supported by * this file writer + * @throws NullPointerException if {@code in} or {@code out} are + * {@code null} * @see #isFileTypeSupported(int, Sequence) * @see #getMidiFileTypes(Sequence) */ public abstract int write(Sequence in, int fileType, OutputStream out) throws IOException;
*** 127,136 **** --- 131,142 ---- * @param out external file to which the file data should be written * @return the number of bytes written to the file * @throws IOException if an I/O exception occurs * @throws IllegalArgumentException if the file type is not supported by * this file writer + * @throws NullPointerException if {@code in} or {@code out} are + * {@code null} * @see #isFileTypeSupported(int, Sequence) * @see #getMidiFileTypes(Sequence) */ public abstract int write(Sequence in, int fileType, File out) throws IOException;
< prev index next >