summaryrefslogtreecommitdiff
path: root/java/src/Blob.java
diff options
context:
space:
mode:
authornobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-09-13 00:26:05 +0000
committernobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-09-13 00:26:05 +0000
commit7a042e4f8a987a50143415af690a878881d4b48f (patch)
tree338a92488326f0585d65743bd3d6ec0650fd6db1 /java/src/Blob.java
parent9b50028195a935518c2716dcdb94d5bb167a0af2 (diff)
downloadATCD-TAO-1_0_4.tar.gz
This commit was manufactured by cvs2svn to create tag 'TAO-1_0_4'.TAO-1_0_4
Diffstat (limited to 'java/src/Blob.java')
-rw-r--r--java/src/Blob.java94
1 files changed, 0 insertions, 94 deletions
diff --git a/java/src/Blob.java b/java/src/Blob.java
deleted file mode 100644
index 69feef248b3..00000000000
--- a/java/src/Blob.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*************************************************
- *
- * = PACKAGE
- * JACE.Connection
- *
- * = FILENAME
- * Blob.java
- *
- *@author Prashant Jain
- *
- *************************************************/
-package JACE.Connection;
-
-import java.io.*;
-import java.net.*;
-import JACE.SOCK_SAP.*;
-import JACE.ASX.*;
-import JACE.OS.*;
-
-public class Blob
-{
- public int open (String filename, String hostname , int port)
- {
- this.filename_ = filename;
- this.hostname_ = hostname;
- this.port_ = port;
- return 0;
- }
-
- public MessageBlock read (int length, int offset)
- {
- // Check if we have a valid length and a valid offset
- if (length < 0 || offset < 0)
- {
- ACE.ERROR ("Blob::read(): Negative length or offset");
- return null;
- }
-
- // Create a Blob Reader
- BlobReader blobReader = new BlobReader (length, offset, this.filename_, this.hostname_, this.port_);
-
- // Receive data
- MessageBlock mb = blobReader.receiveData ();
- if (blobReader.bytesRead () != length)
- return null;
- else
- return mb;
- }
-
- public int write (MessageBlock mb, int length, int offset)
- {
- // Check if we have a valid length and a valid offset
- if (length < 0 || offset < 0)
- ACE.ERROR ("Blob::write(): Negative length or offset");
-
- // Create a Blob Writer
- BlobWriter blobWriter = new BlobWriter (mb, length, offset, this.filename_);
-
- try
- {
- // Connect to the server
- this.connector_.open (this.hostname_, this.port_);
- this.connector_.connect (blobWriter);
- }
- catch (UnknownHostException e)
- {
- ACE.ERROR (e);
- }
- catch (InstantiationException e)
- {
- ACE.ERROR (e);
- }
- catch (IllegalAccessException e)
- {
- ACE.ERROR (e);
- }
- catch (IOException e)
- {
- ACE.ERROR (e);
- }
-
- return blobWriter.bytesWritten ();
- }
-
- public int close ()
- {
- return 0;
- }
-
- String filename_;
- String hostname_;
- int port_;
- Connector connector_ = new Connector ();
-}