< prev index next >

test/com/sun/jndi/dns/Parser.java

Print this page




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 8035105
  27  * @summary DNS resource record parsing
  28  * @modules jdk.naming.dns/com.sun.jndi.dns:+open
  29  *
  30  * @compile --add-modules jdk.naming.dns Parser.java
  31  * @run main Parser
  32  */
  33 
  34 import com.sun.jndi.dns.ResourceRecord;
  35 import javax.naming.CommunicationException;
  36 import javax.naming.InvalidNameException;;
  37 
  38 import java.lang.reflect.Constructor;
  39 import java.lang.reflect.InvocationTargetException;
  40 
  41 import java.io.IOException;
  42 
  43 import static java.nio.charset.StandardCharsets.ISO_8859_1;
  44 
  45 public class Parser {
  46     static Constructor<ResourceRecord> rrConstructor;
  47     static {
  48         try {
  49             rrConstructor = ResourceRecord.class.getDeclaredConstructor(
  50                 byte[].class, int.class, int.class, boolean.class,
  51                 boolean.class);




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 8035105
  27  * @summary DNS resource record parsing
  28  * @modules jdk.naming.dns/com.sun.jndi.dns:+open



  29  */
  30 
  31 import com.sun.jndi.dns.ResourceRecord;
  32 import javax.naming.CommunicationException;
  33 import javax.naming.InvalidNameException;;
  34 
  35 import java.lang.reflect.Constructor;
  36 import java.lang.reflect.InvocationTargetException;
  37 
  38 import java.io.IOException;
  39 
  40 import static java.nio.charset.StandardCharsets.ISO_8859_1;
  41 
  42 public class Parser {
  43     static Constructor<ResourceRecord> rrConstructor;
  44     static {
  45         try {
  46             rrConstructor = ResourceRecord.class.getDeclaredConstructor(
  47                 byte[].class, int.class, int.class, boolean.class,
  48                 boolean.class);


< prev index next >