[libbluray-devel] [Git][videolan/libbluray][master] Add missing javax.microedition.io interfaces
Petri Hintukainen
gitlab at videolan.org
Wed Feb 27 09:32:18 CET 2019
Petri Hintukainen pushed to branch master at VideoLAN / libbluray
Commits:
9e67bca6 by hpi1 at 2019-02-27T07:37:39Z
Add missing javax.microedition.io interfaces
- - - - -
21 changed files:
- + src/libbluray/bdj/java/javax/microedition/io/CommConnection.java
- + src/libbluray/bdj/java/javax/microedition/io/Connection.java
- + src/libbluray/bdj/java/javax/microedition/io/ConnectionNotFoundException.java
- + src/libbluray/bdj/java/javax/microedition/io/Connector.java
- + src/libbluray/bdj/java/javax/microedition/io/ContentConnection.java
- + src/libbluray/bdj/java/javax/microedition/io/Datagram.java
- + src/libbluray/bdj/java/javax/microedition/io/DatagramConnection.java
- + src/libbluray/bdj/java/javax/microedition/io/HttpConnection.java
- + src/libbluray/bdj/java/javax/microedition/io/HttpsConnection.java
- + src/libbluray/bdj/java/javax/microedition/io/InputConnection.java
- + src/libbluray/bdj/java/javax/microedition/io/OutputConnection.java
- + src/libbluray/bdj/java/javax/microedition/io/SecureConnection.java
- + src/libbluray/bdj/java/javax/microedition/io/SecurityInfo.java
- + src/libbluray/bdj/java/javax/microedition/io/ServerSocketConnection.java
- + src/libbluray/bdj/java/javax/microedition/io/SocketConnection.java
- + src/libbluray/bdj/java/javax/microedition/io/StreamConnection.java
- + src/libbluray/bdj/java/javax/microedition/io/StreamConnectionNotifier.java
- + src/libbluray/bdj/java/javax/microedition/io/UDPDatagramConnection.java
- + src/libbluray/bdj/java/javax/microedition/pki/Certificate.java
- + src/libbluray/bdj/java/javax/microedition/pki/CertificateException.java
- + src/libbluray/bdj/java/org/videolan/io/ConnectorImpl.java
Changes:
=====================================
src/libbluray/bdj/java/javax/microedition/io/CommConnection.java
=====================================
@@ -0,0 +1,25 @@
+/*
+ * This file is part of libbluray
+ * Copyright (C) 2019 VideoLAN
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+package javax.microedition.io;
+
+public interface CommConnection extends StreamConnection {
+ public abstract int getBaudRate();
+ public abstract int setBaudRate(int baudrate);
+}
=====================================
src/libbluray/bdj/java/javax/microedition/io/Connection.java
=====================================
@@ -0,0 +1,26 @@
+/*
+ * This file is part of libbluray
+ * Copyright (C) 2019 VideoLAN
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+package javax.microedition.io;
+
+import java.io.IOException;
+
+public interface Connection {
+ public abstract void close() throws IOException;
+}
=====================================
src/libbluray/bdj/java/javax/microedition/io/ConnectionNotFoundException.java
=====================================
@@ -0,0 +1,32 @@
+/*
+ * This file is part of libbluray
+ * Copyright (C) 2019 VideoLAN
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+package javax.microedition.io;
+
+import java.io.IOException;
+
+public class ConnectionNotFoundException extends IOException {
+
+ public ConnectionNotFoundException() {
+ }
+
+ public ConnectionNotFoundException(String s) {
+ super(s);
+ }
+}
=====================================
src/libbluray/bdj/java/javax/microedition/io/Connector.java
=====================================
@@ -0,0 +1,95 @@
+/*
+ * This file is part of libbluray
+ * Copyright (C) 2019 VideoLAN
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+package javax.microedition.io;
+
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import org.videolan.io.ConnectorImpl;
+
+public class Connector {
+
+ public static final int READ = 1;
+ public static final int WRITE = 2;
+ public static final int READ_WRITE = 3;
+
+ public static Connection open(String name) throws IOException {
+ return open(name, READ_WRITE);
+ }
+
+ public static Connection open(String name, int mode) throws IOException {
+ return open(name, mode, false);
+ }
+
+ public static Connection open(String name, int mode, boolean timeouts) throws IOException {
+ if (mode != READ && mode != WRITE && mode != READ_WRITE) {
+ throw new IllegalArgumentException("invalid mode");
+ }
+ if (name == null) {
+ throw new IllegalArgumentException("null URL");
+ }
+ if (name.equals("")) {
+ throw new IllegalArgumentException("empty URL");
+ }
+
+ return ConnectorImpl.open(name, mode, timeouts);
+ }
+
+ public static DataInputStream openDataInputStream(String name) throws IOException {
+ InputConnection ic = null;
+ try {
+ ic = (InputConnection)open(name, READ);
+ } catch (ClassCastException cce) {
+ throw new IllegalArgumentException(name);
+ }
+
+ try {
+ return ic.openDataInputStream();
+ } finally {
+ ic.close();
+ }
+ }
+
+ public static DataOutputStream openDataOutputStream(String name) throws IOException {
+ OutputConnection oc = null;
+ try {
+ oc = (OutputConnection)open(name, WRITE);
+ } catch (ClassCastException cce) {
+ throw new IllegalArgumentException(name);
+ }
+
+ try {
+ return oc.openDataOutputStream();
+ } finally {
+ oc.close();
+ }
+ }
+
+ public static InputStream openInputStream(String name) throws IOException {
+ return openDataInputStream(name);
+ }
+
+ public static OutputStream openOutputStream(String name)throws IOException {
+ return openDataOutputStream(name);
+ }
+}
=====================================
src/libbluray/bdj/java/javax/microedition/io/ContentConnection.java
=====================================
@@ -0,0 +1,26 @@
+/*
+ * This file is part of libbluray
+ * Copyright (C) 2019 VideoLAN
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+package javax.microedition.io;
+
+public interface ContentConnection extends StreamConnection {
+ public abstract String getEncoding();
+ public abstract long getLength();
+ public abstract String getType();
+}
=====================================
src/libbluray/bdj/java/javax/microedition/io/Datagram.java
=====================================
@@ -0,0 +1,36 @@
+/*
+ * This file is part of libbluray
+ * Copyright (C) 2019 VideoLAN
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+package javax.microedition.io;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+public interface Datagram extends DataInput, DataOutput {
+ public abstract String getAddress();
+ public abstract byte[] getData();
+ public abstract int getLength();
+ public abstract int getOffset();
+ public abstract void reset();
+ public abstract void setAddress(String addr) throws IOException;
+ public abstract void setAddress(Datagram dgram);
+ public abstract void setData(byte[] data, int offset, int len);
+ public abstract void setLength(int len);
+}
=====================================
src/libbluray/bdj/java/javax/microedition/io/DatagramConnection.java
=====================================
@@ -0,0 +1,33 @@
+/*
+ * This file is part of libbluray
+ * Copyright (C) 2019 VideoLAN
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+package javax.microedition.io;
+
+import java.io.IOException;
+
+public interface DatagramConnection extends Connection {
+ public abstract int getMaximumLength() throws IOException;
+ public abstract int getNominalLength() throws IOException;
+ public abstract Datagram newDatagram(int size) throws IOException;
+ public abstract Datagram newDatagram(int size, String addr) throws IOException;
+ public abstract Datagram newDatagram(byte[] buf, int size) throws IOException;
+ public abstract Datagram newDatagram(byte[] buf, int size, String addr) throws IOException;
+ public abstract void receive(Datagram dgram) throws IOException;
+ public abstract void send(Datagram dgram) throws IOException;
+}
=====================================
src/libbluray/bdj/java/javax/microedition/io/HttpConnection.java
=====================================
@@ -0,0 +1,90 @@
+/*
+ * This file is part of libbluray
+ * Copyright (C) 2019 VideoLAN
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+package javax.microedition.io;
+
+import java.io.IOException;
+
+public interface HttpConnection extends ContentConnection {
+
+ public static final String HEAD = "HEAD";
+ public static final String GET = "GET";
+ public static final String POST = "POST";
+
+ public static final int HTTP_OK = 200;
+ public static final int HTTP_CREATED = 201;
+ public static final int HTTP_ACCEPTED = 202;
+ public static final int HTTP_NOT_AUTHORITATIVE = 203;
+ public static final int HTTP_NO_CONTENT = 204;
+ public static final int HTTP_RESET = 205;
+ public static final int HTTP_PARTIAL = 206;
+ public static final int HTTP_MULT_CHOICE = 300;
+ public static final int HTTP_MOVED_PERM = 301;
+ public static final int HTTP_MOVED_TEMP = 302;
+ public static final int HTTP_SEE_OTHER = 303;
+ public static final int HTTP_NOT_MODIFIED = 304;
+ public static final int HTTP_USE_PROXY = 305;
+ public static final int HTTP_TEMP_REDIRECT = 307;
+ public static final int HTTP_BAD_REQUEST = 400;
+ public static final int HTTP_UNAUTHORIZED = 401;
+ public static final int HTTP_PAYMENT_REQUIRED = 402;
+ public static final int HTTP_FORBIDDEN = 403;
+ public static final int HTTP_NOT_FOUND = 404;
+ public static final int HTTP_BAD_METHOD = 405;
+ public static final int HTTP_NOT_ACCEPTABLE = 406;
+ public static final int HTTP_PROXY_AUTH = 407;
+ public static final int HTTP_CLIENT_TIMEOUT = 408;
+ public static final int HTTP_CONFLICT = 409;
+ public static final int HTTP_GONE = 410;
+ public static final int HTTP_LENGTH_REQUIRED = 411;
+ public static final int HTTP_PRECON_FAILED = 412;
+ public static final int HTTP_ENTITY_TOO_LARGE = 413;
+ public static final int HTTP_REQ_TOO_LONG = 414;
+ public static final int HTTP_UNSUPPORTED_TYPE = 415;
+ public static final int HTTP_UNSUPPORTED_RANGE = 416;
+ public static final int HTTP_EXPECT_FAILED = 417;
+ public static final int HTTP_INTERNAL_ERROR = 500;
+ public static final int HTTP_NOT_IMPLEMENTED = 501;
+ public static final int HTTP_BAD_GATEWAY = 502;
+ public static final int HTTP_UNAVAILABLE = 503;
+ public static final int HTTP_GATEWAY_TIMEOUT = 504;
+ public static final int HTTP_VERSION = 505;
+
+ public abstract long getDate() throws IOException;
+ public abstract long getExpiration() throws IOException;
+ public abstract String getFile();
+ public abstract String getHeaderField(int n) throws IOException;
+ public abstract String getHeaderField(String name) throws IOException;
+ public abstract long getHeaderFieldDate(String name, long def) throws IOException;
+ public abstract int getHeaderFieldInt(String name, int def) throws IOException;
+ public abstract String getHeaderFieldKey(int n) throws IOException;
+ public abstract String getHost();
+ public abstract long getLastModified() throws IOException;
+ public abstract int getPort();
+ public abstract String getProtocol();
+ public abstract String getQuery();
+ public abstract String getRef();
+ public abstract String getRequestMethod();
+ public abstract String getRequestProperty(String key);
+ public abstract int getResponseCode() throws IOException;
+ public abstract String getResponseMessage() throws IOException;
+ public abstract String getURL();
+ public abstract void setRequestMethod(String method) throws IOException;
+ public abstract void setRequestProperty(String key, String value) throws IOException;
+}
=====================================
src/libbluray/bdj/java/javax/microedition/io/HttpsConnection.java
=====================================
@@ -0,0 +1,27 @@
+/*
+ * This file is part of libbluray
+ * Copyright (C) 2019 VideoLAN
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+package javax.microedition.io;
+
+import java.io.IOException;
+
+public interface HttpsConnection extends HttpConnection {
+ public abstract int getPort();
+ public abstract SecurityInfo getSecurityInfo() throws IOException;
+}
=====================================
src/libbluray/bdj/java/javax/microedition/io/InputConnection.java
=====================================
@@ -0,0 +1,29 @@
+/*
+ * This file is part of libbluray
+ * Copyright (C) 2019 VideoLAN
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+package javax.microedition.io;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+public interface InputConnection extends Connection {
+ public abstract DataInputStream openDataInputStream() throws IOException;
+ public abstract InputStream openInputStream() throws IOException;
+}
=====================================
src/libbluray/bdj/java/javax/microedition/io/OutputConnection.java
=====================================
@@ -0,0 +1,29 @@
+/*
+ * This file is part of libbluray
+ * Copyright (C) 2019 VideoLAN
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+package javax.microedition.io;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+
+public interface OutputConnection extends Connection {
+ public abstract DataOutputStream openDataOutputStream() throws IOException;
+ public abstract OutputStream openOutputStream() throws IOException;
+}
=====================================
src/libbluray/bdj/java/javax/microedition/io/SecureConnection.java
=====================================
@@ -0,0 +1,26 @@
+/*
+ * This file is part of libbluray
+ * Copyright (C) 2019 VideoLAN
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+package javax.microedition.io;
+
+import java.io.IOException;
+
+public interface SecureConnection extends SocketConnection {
+ public abstract SecurityInfo getSecurityInfo() throws IOException;
+}
=====================================
src/libbluray/bdj/java/javax/microedition/io/SecurityInfo.java
=====================================
@@ -0,0 +1,29 @@
+/*
+ * This file is part of libbluray
+ * Copyright (C) 2019 VideoLAN
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+package javax.microedition.io;
+
+import javax.microedition.pki.Certificate;
+
+public interface SecurityInfo {
+ public abstract String getCipherSuite();
+ public abstract String getProtocolName();
+ public abstract String getProtocolVersion();
+ public abstract Certificate getServerCertificate();
+}
=====================================
src/libbluray/bdj/java/javax/microedition/io/ServerSocketConnection.java
=====================================
@@ -0,0 +1,27 @@
+/*
+ * This file is part of libbluray
+ * Copyright (C) 2019 VideoLAN
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+package javax.microedition.io;
+
+import java.io.IOException;
+
+public interface ServerSocketConnection extends StreamConnectionNotifier {
+ public abstract String getLocalAddress() throws IOException;
+ public abstract int getLocalPort() throws IOException;
+}
=====================================
src/libbluray/bdj/java/javax/microedition/io/SocketConnection.java
=====================================
@@ -0,0 +1,38 @@
+/*
+ * This file is part of libbluray
+ * Copyright (C) 2019 VideoLAN
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+package javax.microedition.io;
+
+import java.io.IOException;
+
+public interface SocketConnection extends StreamConnection {
+
+ public static final byte DELAY = 0;
+ public static final byte LINGER = 1;
+ public static final byte KEEPALIVE = 2;
+ public static final byte RCVBUF = 3;
+ public static final byte SNDBUF = 4;
+
+ public abstract String getAddress() throws IOException;
+ public abstract String getLocalAddress() throws IOException;
+ public abstract int getLocalPort() throws IOException;
+ public abstract int getPort() throws IOException;
+ public abstract int getSocketOption(byte option) throws IOException;
+ public abstract void setSocketOption(byte option, int value) throws IOException;
+}
=====================================
src/libbluray/bdj/java/javax/microedition/io/StreamConnection.java
=====================================
@@ -0,0 +1,23 @@
+/*
+ * This file is part of libbluray
+ * Copyright (C) 2019 VideoLAN
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+package javax.microedition.io;
+
+public interface StreamConnection extends InputConnection, OutputConnection {
+}
=====================================
src/libbluray/bdj/java/javax/microedition/io/StreamConnectionNotifier.java
=====================================
@@ -0,0 +1,26 @@
+/*
+ * This file is part of libbluray
+ * Copyright (C) 2019 VideoLAN
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+package javax.microedition.io;
+
+import java.io.IOException;
+
+public interface StreamConnectionNotifier extends Connection {
+ public abstract StreamConnection acceptAndOpen() throws IOException;
+}
=====================================
src/libbluray/bdj/java/javax/microedition/io/UDPDatagramConnection.java
=====================================
@@ -0,0 +1,27 @@
+/*
+ * This file is part of libbluray
+ * Copyright (C) 2019 VideoLAN
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+package javax.microedition.io;
+
+import java.io.IOException;
+
+public interface UDPDatagramConnection extends DatagramConnection {
+ public abstract String getLocalAddress() throws IOException;
+ public abstract int getLocalPort() throws IOException;
+}
=====================================
src/libbluray/bdj/java/javax/microedition/pki/Certificate.java
=====================================
@@ -0,0 +1,31 @@
+/*
+ * This file is part of libbluray
+ * Copyright (C) 2019 VideoLAN
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+package javax.microedition.pki;
+
+public interface Certificate {
+ public abstract String getIssuer();
+ public abstract long getNotAfter();
+ public abstract long getNotBefore();
+ public abstract String getSerialNumber();
+ public abstract String getSigAlgName();
+ public abstract String getSubject();
+ public abstract String getType();
+ public abstract String getVersion();
+}
=====================================
src/libbluray/bdj/java/javax/microedition/pki/CertificateException.java
=====================================
@@ -0,0 +1,63 @@
+/*
+ * This file is part of libbluray
+ * Copyright (C) 2019 VideoLAN
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+package javax.microedition.pki;
+
+import java.io.IOException;
+
+public class CertificateException extends IOException {
+
+ public static final byte BAD_EXTENSIONS = 1;
+ public static final byte CERTIFICATE_CHAIN_TOO_LONG = 2;
+ public static final byte EXPIRED = 3;
+ public static final byte UNAUTHORIZED_INTERMEDIATE_CA = 4;
+ public static final byte MISSING_SIGNATURE = 5;
+ public static final byte NOT_YET_VALID = 6;
+ public static final byte SITENAME_MISMATCH = 7;
+ public static final byte UNRECOGNIZED_ISSUER = 8;
+ public static final byte UNSUPPORTED_SIGALG = 9;
+ public static final byte INAPPROPRIATE_KEY_USAGE = 10;
+ public static final byte BROKEN_CHAIN = 11;
+ public static final byte ROOT_CA_EXPIRED = 12;
+ public static final byte UNSUPPORTED_PUBLIC_KEY_TYPE = 13;
+ public static final byte VERIFICATION_FAILED = 14;
+
+ public CertificateException(Certificate cert, byte reason) {
+ super("" + reason);
+ this.cert = cert;
+ this.reason = reason;
+ }
+
+ public CertificateException(String message, Certificate cert, byte reason) {
+ super(message);
+ this.cert = cert;
+ this.reason = reason;
+ }
+
+ public Certificate getCertificate() {
+ return cert;
+ }
+
+ public byte getReason() {
+ return reason;
+ }
+
+ private Certificate cert;
+ private byte reason;
+}
=====================================
src/libbluray/bdj/java/org/videolan/io/ConnectorImpl.java
=====================================
@@ -0,0 +1,33 @@
+/*
+ * This file is part of libbluray
+ * Copyright (C) 2019 VideoLAN
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+package org.videolan.io;
+
+import java.io.IOException;
+import javax.microedition.io.Connection;
+import javax.microedition.io.ConnectionNotFoundException;
+
+import org.videolan.Logger;
+
+public class ConnectorImpl {
+ public static Connection open(String name, int mode, boolean timeouts) throws IOException {
+ Logger.getLogger(ConnectorImpl.class.getName()).unimplemented();
+ throw new ConnectionNotFoundException("Not implemented: " + name);
+ }
+}
View it on GitLab: https://code.videolan.org/videolan/libbluray/commit/9e67bca6fc4a8b1985622e309aac8ae3cad9a3d1
--
View it on GitLab: https://code.videolan.org/videolan/libbluray/commit/9e67bca6fc4a8b1985622e309aac8ae3cad9a3d1
You're receiving this email because of your account on code.videolan.org.
More information about the libbluray-devel
mailing list