Multiple input streams

hey folks newbie here
i am designing a client server program
with my client i want to send serialized objects & primitive types across the socket to the server
is it possible to creat two output streams on the same socket i.e an ObjectOutputStream & a DataOutputStream on the same socket, i have tried this but get some errors so i don't think this is possible
if not possible how would i be able to send both primitive types & serialized objects across the same socket

Forget about the first person's post. He his correct, but it is not the solution used by most developers.
Multiple Input Streams/Output Streams are easy to create. A better "management" deal would be like FTP - FTP uses two port, one for data and one for commands.
Socket objectSocket = new Socket("www.object-server.com", objectPort);
Socket dataSocket = new Socket("www.data-server.com", dataPort);
The server should implement a class which represents the connection of both sockets as a single client. Somethig like this:
public class Connection {
    Socket dataSocket;
    Socket objectSocket;
    public Connection(Socket s1) {
        dataSocket = s1;
    public void addObjectSocket(Socket s2) {
        objectSocket = s2;
}You can then use this class (permission given to copy and use without license hereby granted) to manage the task.
There are also many other ways of doing this. You can also apply multiple i/o streams to the same socket - but your server/client needs to know which data type is being sent or to which stream the data needs to be read from.
Example: Client sends binary file to server (such as FTP)
ObjectOutputStream out = new ObjectOutputStream(socket.getOutputStream());
PrintWriter out2 = new PrintWriter(socket.getOutputStream());
The code above will work, but data send in one stream will not show up in the other stream. The server does the reverse for the input > adding different InputStreams to the socket, but when data is sent from the client's object stream both of the server's streams (BufferedReader or other text-based input) and the object stream will receieve the file, so you need to communicate between the client and server which stream to read from/write to.
Client: Send file via socket to server by means of ObjectOutputStream
Note: You should not need to implement the try-catch logic when passing the argument of the socket - since it would throw that in the class which was calling the constructor, but you CAN implement it here as long as it is not handled in the calling class. If you do, the complier should throw an error saying that the exception would not be thrown at this point.

Similar Messages

  • Multiple input stream in one socket connection

    Can we have multiple input streams for a java socket connection? It means that in a client/server application (creates using java socket), can we have multiple input streams for the client side program. For example, the input streams are to cater for the need of letting the user to chat and downloading some files from the chat partner at the same time. And do we need to use thread to create the multiple input streams like the case when we create a multithreaded server? Anyone out there who knows the solution please post it. Thanks in advance.

    Can we have multiple input streams for a java socket
    connection? It means that in a client/server
    application (creates using java socket), can we have
    multiple input streams for the client side program.
    For example, the input streams are to cater for the
    need of letting the user to chat and downloading some
    files from the chat partner at the same time. And do
    we need to use thread to create the multiple input
    streams like the case when we create a multithreaded
    server? Anyone out there who knows the solution please
    post it. Thanks in advance.Ok im no expert here but this is what i learned:
    a Socket can have only one InputStream (Socket.getInputStream()) and one OutputStream Socket.getOutputStream()). So you will have to create a way to make multiple Socket connections in your client program. And yes, you have to use threads for your server. if you dont the client will have to wait until the user before them is finished with the connection before being able to connect. I hope this helps you out. BTW please check out http://www.javabible.com. they have the book online now for free.
    Joeyford1

  • What does the Merge Data Stream processor do when there are multiple input streams to it from the same reader?

    Hi,
    I have a process with a reader of master data that outputs 5 records that feeds simultaneously into 3 different lookup and return processors.
    Each lookup and return processor brings some data back from a detail table. There can be multiple details so I follow each lookup processor with a split records from array processor. Hence I end up with 3 'streams' of data. Stream 1 has 8 records, stream 2 has 5 records and stream 3 has 6 records.
    I join all these streams to a Merge Data Streams processor.
    I end up with 9 records so although the help for the Merge Data Streams processor says 'Merge Data Streams does not perform any transformation, matching, or merging of records' there is clearly some merging going on.
    What is the behaviour of the merge data streams processor in this scenario?
    I have added attributes and flags into each of the streams. How many records should I see and what values should the added attributes/flags have (some records show attributes/flags from all 3 streams whereas others show just those attributes/flags from one stream).
    I have developed a test case simply to understand what the processor is doing but it's not obvious and furthermore it's probably unwise to develop EDQ processes where the processor behaviour is not documented and guaranteed to remain consistent. What I am trying to achieve is to bring all of a person's (the master data) various details (assignments, employers, etc.) together so we can check the data (some rules require data from multiple details).
    Thanks, Nik

    Cheers Mike - and for the explanation of the terms.
    I think I understand now how it's supposed to work.
    What I'm finding however is that when I set a flag to Y at the beginning of a path (that includes a lookup and return and then split records from array processor) that flag is showing no (i.e. an empty) value in SOME of the records shown in the subsequent MDS processor (it's fine the very last split processor before we get to the MDS but then again there are fewer records in that split processor than the MDS).
    In my case there are obviously more records in the MDS processor than there were in the original reader (because the lookup and returns are configured to have unlimited maximum matches). As mentioned, the different paths return different numbers of  records before being combined in the MDS. Say a reader has 5 records and path 1 returns 8 records in total including a path-specific flag (flag1, set to Y) but path 2 (that again adds its own path-specific flag (flag2, set to Y) returns just 5 records (since nothing was added from the lookups) are you saying that flag2 would show as 'Y' for all 8 records shown in the MDS?
    Hopefully you would be able to see what I mean if you try to create a process like the one I've described (or I can upload a package).
    Re. the purpose of the separate paths approach it is simply to allow the visualisation ('showing the working' as Neil puts it) of the different checks being carried out by the process.
    This is considered one of the benefits of the tool over writing SQL queries (with outer joins, query criteria, etc.).
    Also, as mentioned I was following an example that Neil put together for us to ensure that we are doing things in a 'proper' and supported way.
    If we put all the lookups, etc. for all the checks into one datastream then it no longer becomes so understandable and the value of joining processors in a process over simply writing SQL becomes questionable; arguably the EDQ process in fact becomes less easy to understand than simply writing SQL.
    Also, to go down this route I will need to revise the (what was previously substantially working until I revised it) processes that I have already developed.
    Thanks, Nik

  • Error while executing SSIS package - Error: 4014, Severity:20, State: 11. A fatal error occurred while reading the input stream from the network. The session will be terminated (input error: 109, output error: 0)

    Hi,
    We are getting the following error when running our SSIS packages on Microsoft SQL Server 2012 R2 on Windows Server 2008 R2 SP1:
    Error: 4014, Severity:20, State: 11.   A fatal error occurred while reading the input stream from the network. The session will be terminated (input error: 109, output error: 0)
    SQL Server Data Tools and SQL Server Database Engine reside on the same server.
    We tried the following:
    Disabling TCP Chimney Offload
    Installed Windows Server 2008 SP1
    Splitting our SSIS code into multiple steps so it is not all one large continuous operation
    The error occurs during a BulkDataLoad task.
    Other options we are investigating with the engineering team (out-sourced, so delayed responses):
    Firewall configurations (everything is local, so this should not make a difference)
    Disabling the anti-virus scanner
    Are there other things we can try?
    Any insight is greatly appreciated.
    Thanks!

    Hi HenryKwan,
    Based on the current information, the issue can be caused by many reasons. Please refer to the following tips:
    Install the latest hotfix based on your SQL Server version. Ps: there is no SQL Server 2012 R2 version.
    Change the MaxConcurrentExecutables property from -1 to another one based on the MAXDOP. For example, 8.
    Set "RetainSameConnection" Property to FALSE on the all the connection managers.
    Reference:
    https://connect.microsoft.com/SQLServer/feedback/details/774370/ssis-packages-abort-with-unexpected-termination-message
    If the issue is still existed, as Jakub suggested, please provide us more information about this issue.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Reading data from input stream on unix

    I have a program that reads data from input stream from the socket. If the data is over 1500 bytes it is sent in multiple TCP packets. Whats weird is, if I run the program in windows environment it waits till it receives all the packets but when I run the same program in unix environment it only reads the first packet and go further without waiting for all the TCP packets!!
    The line that reads from input stream is
    datalen = inStr.read(byteBuffer);is there anyway I can make it wait till it receives all the packets on unix system? I do not understand why it works fine for windows in this case but not for unix.
    I'll appreciate any help..
    Thanks

    Try using a DataInputStream with the readfully() method.

  • Reading input stream over the tcp socket in unix

    I have a program that reads data from input stream from the socket. If the data is over 1500 bytes it is sent in multiple TCP packets. Whats weird is, if I run the program in windows environment it waits till it receives all the packets but when I run the same program in unix environment it only reads the first packet and go further without waiting for all the TCP packets!!
    The line that reads from input stream is
    datalen = inStr.read(byteBuffer);is there anyway I can make it wait till it receives all the packets on unix system? I do not understand why it works fine for windows in this case but not for unix.
    I'll appreciate any help..
    Thanks

    When the network is busy there can be any amount of dleay between packets. If this is ever 100 ms , then this will break.
    If you send more than one packet per 100 ms you will get two packets at once which will look like one longer packet. Unless you check for this the second packet may get ignored.
    The safe way is to send the packet size before sending the packet. Then on the client read the packet to the correct length. Otherwise you will have a program which just happens to work rather than one which will always work.

  • Mutiple input streams

    i have two different input streams from different locations.
    i want to wait for data on these streams and then process that data.
    at the moment i have it like:
    string a = inputa.readline();
    string b = inputb.readline();
    if(string a.equals(something){//do soemthing
    if(string b.equals(something){//do soemthing else
    but obviously this is a bad way of doing it because b may have to wait for datato come on a, and a may have to wait for data to come on b.
    what is a simple alternative (pref. without threading).
    thanks.

    they do rather independant tasks but unfortunatly
    they need to be within the same class for several
    reasons.
    is there no other way? would organising the if
    statement in some other manner work?Not if they are truly independent. Consider the case where the code is busy with one event and the other event occurs. What will service it?
    Threads, as suggested. Not multiple classes as you said - one class, multiple threads.

  • Multiple RTP streams + local video Player - S.O.S.

    Hi guys,
    I ran out of ideas, so I need your help now. It's gonna be a long one...
    Given:
    MediaLocator(vfw://0) --> DataSource(video) --> Processor(video)
    Then I send processor's output (videoProcessor.getDataOutput()) over RTP to multiple destinations. Of course, I am using cloneable DataSources for this, cause there's no other way. So, now I also need to have a local video feed just for self-reference, but it seems to be a tough one! Let me go over what I've tried til now:
    1. Using DataSource clone from video processor, I tried to create a Player (i.e. Manager.createPlayer(clonedDS) ). BOOM!
    javax.media.NoPlayerException: Cannot find a Player for: com.ibm.media.protocol.SuperCloneableDataSource$PushBufferDataSourceSlave@126c6ea
         at javax.media.Manager.createPlayerForSource(Manager.java:1512)
         at javax.media.Manager.createPlayer(Manager.java:500)
         at org.interlab.mc.media.MediaManager.setVideoProcessorEnabled(MediaManager.java:2046)
         at org.interlab.mc.media.MediaManager.openVideoStreams(MediaManager.java:1807)
         at org.interlab.mc.UserAgent.callStateChanged(UserAgent.java:2516)
         at org.interlab.mc.call.Call.fireCallStateChangedEvent(Call.java:366)
         at org.interlab.mc.call.Call.setState(Call.java:244)
         at org.interlab.mc.call.CallManager.processInviteOK(CallManager.java:330)
         at org.interlab.mc.UserAgent.processResponse(UserAgent.java:1632)
         at gov.nist.javax.sip.EventScanner.deliverEvent(EventScanner.java:288)
         at gov.nist.javax.sip.EventScanner.run(EventScanner.java:489)
         at java.lang.Thread.run(Unknown Source)So i checked. If I create a clone from my DataSource(video) then Manager would return this instance:
    class com.sun.media.multiplexer.RawBufferMux$RawBufferDataSourceBut if, like now, I want to create a clone from DataSource from video processor (i.e. Processor.getDataOutput()) then I get this instance:
    com.ibm.media.protocol.SuperCloneableDataSource$PushBufferDataSourceSlaveHope you noticed the difference. :) Now, from the latter one neither I can create a Player nor can I create a Processor. Too bad. So, I tried another one.
    2. I took my DataSource(video), created a cloneable (just like in Clone.java) and from there I finally got my precious Player! Yes!! But not so fast.... Player was working, but the rest now wasn't. Once I have my DataSource(video) cloned, my Processor(video)'s data output got starved - i could not send video anymore. What a life?! Fine... Let's try another one.
    3. Just like I send video remote I decided to send the video locally in a loop, for instance, from 203.159.2.3:25000 to 203.159.2.3:25002. And what do you think? Still doesnt work!! This "loop" stream is not detected (i.e. controller's update doest sense anything). But if i open JMStudio, and start listening (i.e. open RTP session) on 203.159.2.3:25002, i get my stream showing nice and clear!
    Someone, anyone, please, help! Point my nose to some document, piece of code - anything to make this work.
    Kind regards.

    I'd better post here, so everyone else can get it too. so here it goes:
    That's RTPSocketAdapter
    import java.io.IOException;
    import java.net.InetAddress;
    import java.net.DatagramSocket;
    import java.net.MulticastSocket;
    import java.net.DatagramPacket;
    import java.net.SocketException;
    import javax.media.protocol.PushSourceStream;
    import javax.media.protocol.ContentDescriptor;
    import javax.media.protocol.SourceTransferHandler;
    import javax.media.rtp.RTPConnector;
    import javax.media.rtp.OutputDataStream;
    * An implementation of RTPConnector based on UDP sockets.
    public class RTPSocketAdapter implements RTPConnector {
        DatagramSocket dataSock=null;
        DatagramSocket ctrlSock=null;
        InetAddress remoteAddress=null;
        int remotePort=0;
        InetAddress localAddress=null;
        int localPort=0;
        SockInputStream dataInStrm = null, ctrlInStrm = null;
        SockOutputStream dataOutStrm = null, ctrlOutStrm = null;
        public RTPSocketAdapter(InetAddress localAddress, int localPort,
                                      InetAddress remoteAddress, int remotePort) throws IOException {
             this(localAddress, localPort, remoteAddress, remotePort, 1);
        public RTPSocketAdapter(InetAddress localAddress, int localPort,
                                       InetAddress remoteAddress, int remotePort, int ttl) throws IOException {
              try {
                  if (remoteAddress.isMulticastAddress()) {
                        dataSock = new MulticastSocket(localPort);
                        ctrlSock = new MulticastSocket(localPort+1);
                        ((MulticastSocket)dataSock).joinGroup(remoteAddress);
                        ((MulticastSocket)dataSock).setTimeToLive(ttl);
                        ((MulticastSocket)ctrlSock).joinGroup(remoteAddress);
                        ((MulticastSocket)ctrlSock).setTimeToLive(ttl);
                  else {
                        dataSock = new DatagramSocket(localPort, localAddress);
                        ctrlSock = new DatagramSocket(localPort+1, localAddress);
              catch (SocketException e) {
                  throw new IOException(e.getMessage());
              this.localAddress = localAddress;
              this.localPort = localPort;
              this.remoteAddress = remoteAddress;
              this.remotePort = remotePort;
         * Returns an input stream to receive the RTP data.
        public PushSourceStream getDataInputStream() throws IOException {
              if (dataInStrm == null) {
                  dataInStrm = new SockInputStream(dataSock, remoteAddress, remotePort);
                  dataInStrm.start();
              return dataInStrm;
         * Returns an output stream to send the RTP data.
        public OutputDataStream getDataOutputStream() throws IOException {
              if (dataOutStrm == null)
                  dataOutStrm = new SockOutputStream(dataSock, remoteAddress, remotePort);
              return dataOutStrm;
         * Returns an input stream to receive the RTCP data.
        public PushSourceStream getControlInputStream() throws IOException {
              if (ctrlInStrm == null) {
                  ctrlInStrm = new SockInputStream(ctrlSock, remoteAddress, remotePort+1);
                  ctrlInStrm.start();
              return ctrlInStrm;
         * Returns an output stream to send the RTCP data.
        public OutputDataStream getControlOutputStream() throws IOException {
              if (ctrlOutStrm == null)
                  ctrlOutStrm = new SockOutputStream(ctrlSock, remoteAddress, remotePort+1);
              return ctrlOutStrm;
         * Close all the RTP, RTCP streams.
        public void close() {
              if (dataInStrm != null)
                  dataInStrm.kill();
              if (ctrlInStrm != null)
                  ctrlInStrm.kill();
              dataSock.close();
              ctrlSock.close();
         * Set the receive buffer size of the RTP data channel.
         * This is only a hint to the implementation.  The actual implementation
         * may not be able to do anything to this.
        public void setReceiveBufferSize(int size) throws IOException {
             dataSock.setReceiveBufferSize(size);
         * Get the receive buffer size set on the RTP data channel.
         * Return -1 if the receive buffer size is not applicable for
         * the implementation.
        public int getReceiveBufferSize() {
              try {
                  return dataSock.getReceiveBufferSize();
              catch (Exception e) {
                  return -1;
         * Set the send buffer size of the RTP data channel.
         * This is only a hint to the implementation.  The actual implementation
         * may not be able to do anything to this.
        public void setSendBufferSize( int size) throws IOException {
             dataSock.setSendBufferSize(size);
         * Get the send buffer size set on the RTP data channel.
         * Return -1 if the send buffer size is not applicable for
         * the implementation.
        public int getSendBufferSize() {
              try {
                  return dataSock.getSendBufferSize();
              catch (Exception e) {
                  return -1;
         * Return the RTCP bandwidth fraction.  This value is used to
         * initialize the RTPManager.  Check RTPManager for more detauls.
         * Return -1 to use the default values.
        public double getRTCPBandwidthFraction() {
             return -1;
         * Return the RTCP sender bandwidth fraction.  This value is used to
         * initialize the RTPManager.  Check RTPManager for more detauls.
         * Return -1 to use the default values.
        public double getRTCPSenderBandwidthFraction() {
             return -1;
         * An inner class to implement an OutputDataStream based on UDP sockets.
        class SockOutputStream implements OutputDataStream {
              DatagramSocket sock;
              InetAddress addr;
              int port;
              public SockOutputStream(DatagramSocket sock, InetAddress addr, int port) {
                  this.sock = sock;
                  this.addr = addr;
                  this.port = port;
              public int write(byte data[], int offset, int len) {
                  try {
                       sock.send(new DatagramPacket(data, offset, len, addr, port));
                  catch (Exception e) {
                       return -1;
                  return len;
         * An inner class to implement an PushSourceStream based on UDP sockets.
        class SockInputStream extends Thread implements PushSourceStream {
              DatagramSocket sock;
              InetAddress addr;
              int port;
              boolean done = false;
              boolean dataRead = false;
              SourceTransferHandler sth = null;
              public SockInputStream(DatagramSocket sock, InetAddress addr, int port) {
                  this.sock = sock;
                  this.addr = addr;
                  this.port = port;
              public int read(byte buffer[], int offset, int length) {
                  DatagramPacket p = new DatagramPacket(buffer, offset, length, addr, port);
                  try {
                       sock.receive(p);
                  catch (IOException e) {
                       return -1;
                  synchronized (this) {
                       dataRead = true;
                       notify();
                  return p.getLength();
              public synchronized void start() {
                  super.start();
                  if (sth != null) {
                       dataRead = true;
                       notify();
              public synchronized void kill() {
                  done = true;
                  notify();
              public int getMinimumTransferSize() {
                  return 2 * 1024;     // twice the MTU size, just to be safe.
              public synchronized void setTransferHandler(SourceTransferHandler sth) {
                  this.sth = sth;
                  dataRead = true;
                  notify();
              // Not applicable.
              public ContentDescriptor getContentDescriptor() {
                  return null;
              // Not applicable.
              public long getContentLength() {
                  return LENGTH_UNKNOWN;
              // Not applicable.
              public boolean endOfStream() {
                  return false;
              // Not applicable.
              public Object[] getControls() {
                  return new Object[0];
              // Not applicable.
              public Object getControl(String type) {
                  return null;
          * Loop and notify the transfer handler of new data.
              public void run() {
                  while (!done) {
                        synchronized (this) {
                            while (!dataRead && !done) {
                                  try {
                                      wait();
                                  catch (InterruptedException e) { }
                            dataRead = false;
                        if (sth != null && !done) {
                            sth.transferData(this);
    }See, how to create RTPManager in next post

  • Open an input stream to a socket

    How many times I can open an input stream to a socket? If I create more than one an input stream to a socket, does this affect anything?
    Thanks.

    Generally low level classes do not have high level logic. Socket is a low level class, it's only logic is to connect you to something, and allow you to read and write to that thing (through the socket) using streams. Being able to connect multiple times or setting marks on your stream is a higher level of logic. Putting to much logic is low level classes tends to reduce re-useablility (making unmarkable streams markable as nothing to do with sockets and can be re-used upon any streams that do not support to be marked) and sometimes performances (having marks means having a buffer means having a potential big memory allocation in your Socket that you do not control).
    So in your case, since you are not really interested in re-connecting a socket, you should rather go for a wrapping InputStream that provides marking capabilities over the streams used by the socket class itself.
       Socket socket = getSocket();
       // this one does not support to be marked
       InputStream stream = socket.getInputStream();
       // but now it does :)
       stream = new BufferedInputStream( stream );

  • GZIP compressing input stream?

    I have an API which takes an InputStream for feeding in large binary data.
    Suppose I want to write a wrapper around that API which GZIPs the data on the fly. This would require some kind of InputStream which will compress the data with GZIP on the fly. However, GZIPInputStream can only decompress on the fly.
    Does anyone know of a way to do the exact opposite?

    So, don't store the entire file in memory. Storing a compressed version of the file isn't much of a
    solution.You're not paying attention. I said I can't FIT the data in memory. If I can't fit it in memory, why would I be trying to store it in memory? Hence why I want to store it in a DATABASE.
    If you can't grasp the most simple of uses for a database, there isn't a lot of hope for you in this field in the future.
    You actually can use a ByteArrayOutputStream, to generate the compressed bytes, as I described, > but you apparently we're paying attention, which at this point is all I expect from you.Okay, how? If I simply put all the uncompressed bytes into the GZIPOutputStream and that output stream is attached to the ByteArrayOutputStream, I will run out of memory.
    Code, please. In other words, prove that what you say is possible.
    You are allowed to. It's debatable whether it's a good idea. Anyway this is the first time you
    mentioned JDBC. Back when we wanted to help you (before you called us idiots) that might
    have been useful information. It's easier to help people when you have information about what
    the hell theyr'e trying to do.I did say that we have an API which takes an input stream, and that this was the reason why I had to pass in an input stream. It doesn't matter whether it's JDBC, or anything else. What is important is that it takes an input stream.
    Actually, it's pretty cheap. It's probably cheaper than the cost of the extra RAM you'll need doing
    extraneous compression/decompression.Actually, compression is generally fairly inexpensive, RAM-wise. You lose some CPU, but CPU is even cheaper than the amounts of disk space which we would otherwise need for this.
    We're storing gigabytes of data, and
    I would rather not have to actually store gigabytes
    of data.So, you're not actually storing it now?We're storing it compressed, which makes it take less space. You do know what compression is, right?
    A redesign might end up removing GZIP entirely. But maybe not. It's hard to say because you still
    haven't given a lot of details, and given your attitude I'm certain your estimation of the project is
    entirely wrong anyway. At this point I don't care either way. Good luck with your project to create
    an unmaintainable buggy monstrosity.Actually, this is trying to make the project more maintainable. Right now, we have multiple components each doing the gzipping in their own sections. I'm trying to make a component which can generically take a data stream, and store it into the database compressed.
    You're partially right, though. A redesign would remove GZIP entirely -- I would use Deflate as-is. Deflate has convenient methods for working with smaller chunks of data, and I could borrow much of the code from InflateInputStream and modify it to create DeflateInputStream. The next version of our app, once we're willing to break compatibility, will probably do this.

  • Cached input stream?

    the problem i got is that i got a lot of processes reading the same amount of bytes (6k) from disk at the same time. this will lead to the point where the IO starts blocking since it has to serve too much at once. a solution would be rading out larger chunks at once (like 100k) using something like a CachedImputStream. the CachedInputStream could be chained with a normal InputStream that reads the 6k out of it. this way the disks searches could be reduced a lot.
    i was wondering if there is something like a cached input stream for java already or if i have to wirte one by myself? (note: a BufferedInputStream wouldn't solve the problem since it only tries to keep the buffer full in memory - i can't specify how many bytes to read from disk at once)

    i can't specify how many bytes to read from disk at onceDo you mean the following method does not work?
    read(byte[] bytes, int start, int length)?
    You will probibly find that the OS reads a fixed size e.g. 8K, 16K, 32K or 64K depending on the block size of the disk regardles sof what you set. Using this option reduced the number of calls from your program to the OS, how the OS accesses the disk cannot be controlled in Java. (Your program can only provide a hint)
    If performance is an issue, either reduce the number of concurrent requests or use higher performing disks such as SCSI or multiple SCSI drives mirrored/stripped.

  • Multiple dv streams

    I want to record multiple dv streams on a single mac.
    Apple does not support but one(1) dv cam at the time.
    What can I do?

    Well, I have never tried, but I know that iMovie will spot two different input devices at once, though you can only record with one at a time. I have no idea about SecuritySpy.
    It sems you want all this happening at the same time. I am trying to figure out why a security software would not record from more than one cam at a time. Have you looked at vother software? I am only guessing here. I have never used this stuff.

  • Document file or input stream is not set.

    Error sending mail :Exception Thrown
    oracle.apps.xdo.delivery.DeliveryException: Document file or input stream is not set.
    at oracle.apps.xdo.delivery.AbstractDeliveryRequest.submit(AbstractDeliveryRequest.java:1154)
    Delivery manager:
    Can some one tell me what was wrong with this,
    I check my document path I can describe it
    When i send one attachment it works with the same path
    but when I use multiple attachment it gives then error
    Attachment m = new Attachment();
    m.addAttachment("/fapps/oracle/fintstcomn/java/chami/test.pdf","test.pdf","application/pdf");
    m.addAttachment("/fapps/oracle/fintstcomn/java/chami/test2.pdf","test2.pdf","application/pdf");
    delReq.addProperty(DeliveryPropertyDefinitions.SMTP_ATTACHMENT,m);
    Thanks

    Ok. What I needed to do is use the Bursting Engine to send out an email (list of invoices) to sales reps for our company. From what I read I have created an XML Document (Template) and have successfully ran that but it looks like I need to create a control file(bursting)? This control file would need to be saved as an XML? Is this correct?

  • How do I return an input stream from a text file

    Suppose there's a class with methods..
    one of the methods is something like..
    public int value() and has a return statement at the end obviously for returning an int value..
    Another method reads a text file and creates an input stream..
    Scanner data  = new Scanner(new File(input.next()));
    I want to return the data when I do a call to this method, but I'm not sure what the method heading would look like..

    flounder wrote:
    Are we supposed to magically know what those errors are? Do you think that copying and pasting the exact error messages and indicating the lines they occur on would be useful to us?Sorry about that..
    I've replicated the same code below; and put the number of the line where the error is.
    +cannot find symbol variable read     [line 21]+
    +cannot find symbol variable read     [line 23]+
    +cannot find symbol variable read     [line 29]+
    +cannot find symbol variable read     [line 31]+
    +cannot find symbol variable inputStream     [line 44]+
    +calculate() in textInput cannot be applied to (java.util.Scanner)     [line 57]+
    the reason I have the _______ for the createInputStream() method is because I'm not really sure what the heading type should be to return the input stream.
    import java.io.*;
    import java.util.*;
    public class textInput
              public void requestFileName()
                   Scanner input = new Scanner(System.in);
                   System.out.print("Enter file name: ");
              public _______ createInputStream() throws FileNotFoundException
                   Scanner input = new Scanner(System.in);
                   Scanner read = new Scanner(new File(input.next()));
                   return read;
              public void calculate() throws IOException
    21           double max;
                   double min;
    23            int count = 0;
                   double total = 0;
                   if (read.hasNextDouble())
                        double temp = read.nextDouble();
    29                 max = temp;
                        min = temp;
    31                 count++
                        total += temp;
                        while (read.hasNextDouble())
                             double current = read.nextDouble();
                             count++;
                             min = Math.min(current, min);
                             max = Math.max(current, max);
                             total += current;
                   System.out.println("Max of: " + max);
                   System.out.println("Min of: " + min);
    44            System.out.println("Average of " + total/count);
              public void close() throws IOException
                   inputStream.close();
              public static void main(String[] args)
                   textInput run = new textInput();
                   try
    57                 run.requestFileName();
                        run.createInputStream();
                        run.calculate();
                        run.close();
                   catch(FileNotFoundException e)
                        System.out.println("File not found.");
                        System.exit(0);
                   catch(IOException e)
                        System.out.prinln("File not found.");
                        System.exit(0);
    }

  • How can I have multiple inputs into the selector terminal of a case structure

    Hi everyone
    I have a question on how to wire multiple inputs in to the selector terminal of a case structure. 
    Currently, I have three switches, each switch determines different case. So if I switch the switch 1 is on, the numeric indicator will show 1. If the switch 2 is on, the numeric indicator will show 2, so on and so forth. However, the selector terminal will not allow me to wire multiply inputs into the case structure, I tried Bundle by Name, Bundle and Array to Cluster, but they did not work. I set the case structure with 3 cases, they are 1, 2 and 3.
    Could someone help me please. I have attach an image and the VI of the work I did so far.
    I have another question, is there a function which can toggle other switches to off when there is a switch has been toggled on.
    Thank you very much
    Tommy
    Attachments:
    Trial - Case Structure.vi ‏7 KB

    Tommy, attached find a cheeseball way of doing this that has given me a LOT of mileage over the years.  IT lends itself nicely to a couple of really good practices that NI recommend, but I have given you the bare-bones to "see under the hood".  
    The recommended practices:
    1. You can make this a nice tight sub-vi where you can put it into a core library of routines that you'll use over the years, even extending the logic to look only for changes, etc.
    2.  If you are thinking about Front Panel design considerations, you'll want to use arrays of controls where possible, as that's a nice neat way of containerizing your switch for both the FP and Block Diagram.
    Have fun.  I have TONS of these types of things, so feel free to PM me if you have any other needs.
    Wes
    Wes Ramm, Cyth UK
    CLD, CPLI
    Attachments:
    Boolean Switch Logic.vi ‏11 KB

Maybe you are looking for

  • Use of __typeof__ in Solaris Studio 12.4

    Solaris Studio 12.3 had a __typeof__ operator similar to decltype in C++11.  This is available in a portable wrapper using the Boost macro BOOST_TYPEOF_TPL.  It looks like the Solaris Studio team contributed the modification to Boost which added this

  • New security on 10.2.0.2

    I have a 3rd party product for QA that creates automatically all database objects. When I create users for testing I grant them only connect , resource, and unlimited tablespace. The tool was running until now with no problems on 10.1.0.4, but after

  • Script to show latest updated content

    Do you know of a program, service, or scipt that will do this... I want to have a "what's new" page that is automatically updated..every time someone puts up something new on the site, the page will list it...it will list like the last ten (or howeve

  • Modificaiton of standard sap transaction screen

    Hi All, I have a requirement to modify standard sap screen for transaction PR05 in travel module. I need to add a few fields to the screen and hide a current field. Can you guide me the best way to do it. I think of the following ways:- 1. Change the

  • My MacBook Pro shutdown after it said my USB was draining to much power and now won't turn on please help

    Hi my MacBook will not turn on after it said my USB was draining to much power, and it shut down and now won't turn back on please help