Uses of Class
com.wolfram.jlink.MathLinkException
| Package | Description |
|---|---|
| com.wolfram.jlink |
This is the main J/Link package, containing the classes and interfaces that programmers will use most.
|
| com.wolfram.jlink.ui |
Includes some classes useful in programs with non-trivial user intefaces.
|
| com.wolfram.jlink.util |
A couple of special utility classes: LinkSnooper, a program that displays MathLink traffic between two programs, and MathematicaTask, an Ant task for using Mathematica in Ant build files.
|
-
Uses of MathLinkException in com.wolfram.jlink
Methods in com.wolfram.jlink that throw MathLinkException Modifier and Type Method Description voidMathLink. activate()Same as connect().intMathLink. bytesToGet()Returns the number of bytes that remain to be read in the element that is currently being read in textual form.intMathLink. bytesToPut()Gives the number of bytes that remain to be sent in the element that is currently being sent in textual form.intMathLink. checkFunction(java.lang.String f)Reads a function name and argument count and compares the function name withf.voidMathLink. checkFunctionWithArgCount(java.lang.String f, int argCount)Reads a function name and argument count and compares the function name withfand the argument count withargCount.voidMathLink. connect()Connects the link, if it has not already been connected.voidMathLink. connect(long timeoutMillis)Connects the link, but waits at most timeoutMillis for a response from the other side.static ExprExpr. createFromLink(MathLink ml)This factory method will only be used by advanced programmers who are creating their own classes that implement the MathLink interface.static KernelLinkMathLinkFactory. createKernelLink(MathLink ml)Creates a KernelLink by wrapping a MathLink.static KernelLinkMathLinkFactory. createKernelLink(java.lang.String cmdLine)Creates a KernelLink.static KernelLinkMathLinkFactory. createKernelLink(java.lang.String[] argv)Creates a KernelLink.static LoopbackLinkMathLinkFactory. createLoopbackLink()Creates a LoopbackLink, a special type of link that is written to and read by the same program.longMathLink. createMark()Creates a mark at the current point in the incoming MathLink data stream.static MathLinkMathLinkFactory. createMathLink(java.lang.String cmdLine)Creates a MathLink.static MathLinkMathLinkFactory. createMathLink(java.lang.String[] argv)Creates a MathLink.voidKernelLink. discardAnswer()Reads and discards all packets generated during a computation.voidKernelLink. enableObjectReferences()Call this method to enable the ability to pass Java objects "by reference" to Mathematica.ExprKernelLink. enableObjectReferences(boolean becomeDefaultJVM)Call this method to enable the ability to pass Java objects "by reference" to Mathematica.voidMathLink. endPacket()Call it when you are finished writing the contents of a single packet.voidKernelLink. evaluate(Expr e)Sends an Expr for evaluation.voidKernelLink. evaluate(java.lang.String s)Sends a string for evaluation.voidMathLink. flush()Immediately transmits any data buffered for sending over the link.intMathLink. getArgCount()Reads the argument count of an expression being read manually.java.lang.ObjectKernelLink. getArray(int type, int depth)Extends the MathLink method of the same signature by allowing the extra type specification TYPE_OBJECT.java.lang.ObjectKernelLink. getArray(int type, int depth, java.lang.String[] heads)Extends the MathLink method of the same signature by allowing the extra type specification TYPE_OBJECT.java.lang.ObjectKernelLink. getArray(java.lang.Class elementType, int depth)An improvement on the KernelLink.getArray(int type, int depth) signature that allows you to specify the type of array to create when reading arrays of Java objects.java.lang.ObjectKernelLink. getArray(java.lang.Class elementType, int depth, java.lang.String[] heads)An improvement on the KernelLink.getArray(int type, int depth, String[] heads) signature that allows you to specify the type of array to create when reading arrays of Java objects.java.lang.ObjectMathLink. getArray(int type, int depth)Reads an array of the specified type and depth.java.lang.ObjectMathLink. getArray(int type, int depth, java.lang.String[] heads)Reads an array of the specified type and depth and records the heads at each level.booleanMathLink. getBoolean()Reads the Mathematica symbols True or False as a boolean.boolean[]MathLink. getBooleanArray1()Reads a list as a one-dimensional array of booleans.boolean[][]MathLink. getBooleanArray2()Reads an array as a two-dimensional array of booleans.byte[]MathLink. getByteArray1()Reads a list or array as a one-dimensional array of bytes.byte[][]MathLink. getByteArray2()Reads an array as a two-dimensional array of bytes.byte[]MathLink. getByteString(int missing)Reads a Mathematica string as an array of bytes.char[]MathLink. getCharArray1()Reads a list or array as a one-dimensional array of chars.char[][]MathLink. getCharArray2()Reads an array as a two-dimensional array of chars.java.lang.ObjectMathLink. getComplex()Reads a complex number.java.lang.Object[]MathLink. getComplexArray1()Reads a list as a one-dimensional array of complex numbers.java.lang.Object[][]MathLink. getComplexArray2()Reads a matrix as a two-dimensional array of complex numbers.byte[]MathLink. getData(int len)Gets a specified number of bytes in the textual form of the expression currently being read.doubleMathLink. getDouble()Reads a Mathematica real number or integer as a double.double[]MathLink. getDoubleArray1()Reads a list or array as a one-dimensional array of doubles.double[][]MathLink. getDoubleArray2()Reads an array as a two-dimensional array of doubles.ExprMathLink. getExpr()Reads an expression from the link and creates an Expr from it.float[]MathLink. getFloatArray1()Reads a list or array as a one-dimensional array of floats.float[][]MathLink. getFloatArray2()Reads an array as a two-dimensional array of floats.MLFunctionMathLink. getFunction()Reads a function name and argument count.int[]MathLink. getIntArray1()Reads a list or array as a one-dimensional array of ints.int[][]MathLink. getIntArray2()Reads an array as a two-dimensional array of ints.intMathLink. getInteger()Reads a Mathematica integer as an int.long[]MathLink. getLongArray1()Reads a list as a one-dimensional array of longs.long[][]MathLink. getLongArray2()Reads an array as a two-dimensional array of longs.longMathLink. getLongInteger()Reads a Mathematica integer as a long.intMathLink. getMessage()Deprecated.intKernelLink. getNext()Extends the MathLink method of the same name by allowing the extra return type MLTKOBJECT.intMathLink. getNext()Gives the type of the next element in the expression currently being read.java.lang.ObjectKernelLink. getObject()Reads a Java object reference from the link.short[]MathLink. getShortArray1()Reads a list or array as a one-dimensional array of shorts.short[][]MathLink. getShortArray2()Reads an array as a two-dimensional array of shorts.java.lang.StringMathLink. getString()Reads a Mathematica character string.java.lang.String[]MathLink. getStringArray1()Reads a list as a one-dimensional array of strings.java.lang.String[][]MathLink. getStringArray2()Reads an array as a two-dimensional array of strings.java.lang.StringMathLink. getSymbol()Reads a Mathematica symbol as a string.intKernelLink. getType()Extends the MathLink method of the same name by allowing the extra return type MLTKOBJECT.intMathLink. getType()Gives the type of the current element in the expression currently being read.voidKernelLink. handlePacket(int pkt)Call this to invoke J/Link's internal handling of special packet types.booleanMathLink. messageReady()Deprecated.java.lang.StringMathLink. name()Gives the name of the link.intMathLink. nextPacket()"Opens" the next packet arriving on the link.booleanPacketListener. packetArrived(PacketArrivedEvent evt)Called when a packet arrives.booleanPacketPrinter. packetArrived(PacketArrivedEvent evt)Invoked when a packet arrives on the link.ExprMathLink. peekExpr()Creates an Expr from the current expression, but does not drain it off the link.voidExpr. put(MathLink ml)Not intended for general use.voidKernelLink. put(java.lang.Object obj)Sends an object.voidMathLink. put(boolean b)Sends the boolean value as the Mathematica symbol True or False.voidMathLink. put(double d)Sends a double value.voidMathLink. put(int i)Sends an integer value.voidMathLink. put(long i)Sends a long value.voidMathLink. put(java.lang.Object obj)Sends an object, including strings and arrays.voidMathLink. put(java.lang.Object obj, java.lang.String[] heads)Sends an array object.voidMathLink. putArgCount(int argCount)Specifies the argument count for a composite expression being sent manually.voidMathLink. putByteString(byte[] data)Sends an array of bytes to Mathematica as a string.voidMathLink. putData(byte[] data)Used for sending elements in textual form.voidMathLink. putData(byte[] data, int len)An alternative form of putData() that lets you specify how many bytes from the array should be sent, rather than just sending the whole thing.voidMathLink. putFunction(java.lang.String f, int argCount)Sends a function name and argument count.voidMathLink. putMessage(int msg)Sends a low-level MathLink message.voidMathLink. putNext(int type)Identifies the type of data element that is to be sent.voidKernelLink. putReference(java.lang.Object obj)Sends an object to Mathematica "by reference".voidMathLink. putSize(int size)Specifies the size in bytes of an element being sent in textual form.voidMathLink. putSymbol(java.lang.String s)Sends a symbol name.booleanMathLink. ready()Indicates whether the link has data waiting to be read.voidMathLink. transferExpression(MathLink source)Writes a complete expression from the linksourceto this link.voidMathLink. transferToEndOfLoopbackLink(LoopbackLink source)Writes the entire contents of the LoopbackLinksourceto this link.intKernelLink. waitForAnswer()Reads and discards all packets that arrive up until the packet that contains the result of the computation. -
Uses of MathLinkException in com.wolfram.jlink.ui
Methods in com.wolfram.jlink.ui that throw MathLinkException Modifier and Type Method Description voidMathSessionPane. connect()Connects the link to Mathematica and prepares the pane for use.booleanInterruptDialog. packetArrived(PacketArrivedEvent evt) -
Uses of MathLinkException in com.wolfram.jlink.util
Methods in com.wolfram.jlink.util that throw MathLinkException Modifier and Type Method Description voidLinkSnooper. feMainMessageHandler(int msgType, int ignore)voidLinkSnooper. fePreemptiveMessageHandler(int msgType, int ignore)voidLinkSnooper. feServiceMessageHandler(int msgType, int ignore)voidLinkSnooper. kernelMainMessageHandler(int msgType, int ignore)voidLinkSnooper. kernelPreemptiveMessageHandler(int msgType, int ignore)voidLinkSnooper. kernelServiceMessageHandler(int msgType, int ignore)static voidLinkSnooper. main(java.lang.String[] argv)booleanMathematicaTask. packetArrived(PacketArrivedEvent evt)Constructors in com.wolfram.jlink.util that throw MathLinkException Constructor Description LinkSnooper(java.lang.String[] argv)LinkSnooper(java.lang.String[] argv, java.io.PrintStream pstrm)