Examples of ByteArrayInputStream

@author Michael Zhou
  • com.alibaba.common.lang.io.ByteArrayInputStream
    非同步的ByteArrayInputStream替换方案, 本代码移植自IBM developer works精彩文章, 参见package文档. @author Michael Zhou @version $Id: ByteArrayInputStream.java 509 2004-02-16 05:42:07Z baobao $
  • com.zaranux.client.crypto.ByteArrayInputStream
    A ByteArrayInputStream contains an internal buffer that contains bytes that may be read from the stream. An internal counter keeps track of the next byte to be supplied by the read method.

    Closing a ByteArrayInputStream has no effect. The methods in this class can be called after the stream has been closed without generating an IOException. @author Arthur van Hoff @see java.io.StringBufferInputStream @since JDK1.0

  • java.io.ByteArrayInputStream
    ByteArrayInputStream is used for streaming over a byte array. @see ByteArrayOutputStream
  • net.gleamynode.netty.array.ByteArrayInputStream
    @author The Netty Project (netty@googlegroups.com) @author Trustin Lee (trustin@gmail.com) @version $Rev: 476 $, $Date: 2008-07-04 15:06:37 +0900 (Fri, 04 Jul 2008) $ @see ByteArrayOutputStream @see ByteArrayBufferInputStream @apiviz.uses net.gleamynode.netty.array.ByteArray
  • org.apache.activeio.util.ByteArrayInputStream
  • org.apache.activemq.util.ByteArrayInputStream
    Very similar to the java.io.ByteArrayInputStream but this version is not thread safe.
  • org.apache.kahadb.util.ByteArrayInputStream
    Very similar to the java.io.ByteArrayInputStream but this version is not thread safe.
  • org.fusesource.hawtbuf.ByteArrayInputStream
    irino.com">Hiram Chirino

  • Examples of java.io.ByteArrayInputStream

            fileVO.setPhysical(CvFileVO.FP_PHYSICAL);
            fileVO.setPhysicalFolder(attachmentFolderID);
            fileVO.setAuthorId(individualID);
            fileVO.setIsTemporary(CvFileVO.FIT_YES);

            ByteArrayInputStream inputStream = new ByteArrayInputStream(originalBody.getBytes());

            try {
              CvFileFacade fileFacade = new CvFileFacade();
              newFileID = fileFacade.addFile(individualID, attachmentFolderID, fileVO, inputStream, dataSource);
            } catch (CvFileException cfe) {
    View Full Code Here

    Examples of java.io.ByteArrayInputStream

          Arrays.fill(zeros, (byte)0);
          IvParameterSpec ivSpec = new IvParameterSpec(zeros);
          Cipher cipher = Cipher.getInstance("Blowfish/CBC/PKCS5Padding");
          cipher.init(Cipher.DECRYPT_MODE, blowfishKey, ivSpec);

          ByteArrayInputStream byteArrayInStream = new ByteArrayInputStream(cipher.doFinal(licenseFile));
          returnProperties = new Properties();
          returnProperties.load(byteArrayInStream);
        } catch (Exception exception) {
          logger.error("decryptLicenseFile: generic Exception", exception);
        }
    View Full Code Here

    Examples of java.io.ByteArrayInputStream

                  documentContent.append(ptContent.get(i));
                  if (i != (ptContent.size() - 1)) {
                    documentContent.append("<br><<Page Break>><br>");
                  }
                }
                ByteArrayInputStream inputStream = new ByteArrayInputStream(documentContent.toString()
                    .getBytes());
                // Add the File to the Files Module so that we can download it...
                int fileId = cvf.addFile(individualID, homeFld.getFolderId(), flvo, inputStream,
                    dataSource);
                Message[2] = String.valueOf(fileId);
    View Full Code Here

    Examples of java.io.ByteArrayInputStream

            fileVO.setPhysical(CvFileVO.FP_PHYSICAL);
            fileVO.setPhysicalFolder(attachmentFolderID);
            fileVO.setAuthorId(individualID);
            fileVO.setIsTemporary(CvFileVO.FIT_YES);

            ByteArrayInputStream inputStream = new ByteArrayInputStream(originalBody.getBytes());

            try {
              CvFileFacade fileFacade = new CvFileFacade();
              newFileID = fileFacade.addFile(individualID, attachmentFolderID, fileVO, inputStream, dataSource);
            }catch(CvFileException cfe){
    View Full Code Here

    Examples of java.io.ByteArrayInputStream

            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            ObjectOutputStream oos = new ObjectOutputStream(baos);
            oos.writeObject(list1);

            ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
            ObjectInputStream ois = new ObjectInputStream(bais);

            TLinkedList list2 = (TLinkedList) ois.readObject();
            assertEquals(list1, list2);
        }
    View Full Code Here

    Examples of java.io.ByteArrayInputStream

          String varName = varRef.getName();
          TVariableInfo varInfo = mgmtFacade.getVariableInfo(scopeId, varName).getVariableInfo();
          Object obj = varInfo.getValue()// actually an xml representation
          variables.put(varName,           // cheap tricks
              XmlToJson.parse(
                  new ByteArrayInputStream(obj.toString().getBytes()
                  )
              )
          );
        }
    View Full Code Here

    Examples of java.io.ByteArrayInputStream

        }

        public static Document getAsDocument(String xmlString) throws SAXException,
                IOException, ParserConfigurationException {
            return newDocumentBuilder().parse(
                    new ByteArrayInputStream(xmlString.getBytes()));
        }
    View Full Code Here

    Examples of java.io.ByteArrayInputStream

        _state = state;
        _content = content;
      }

      public InputStream getContents() throws CoreException {
        return new ByteArrayInputStream(_content);
      }
    View Full Code Here

    Examples of java.io.ByteArrayInputStream

                for (int i=foldersToCreate.size() - 1; i >= 0; i--) {
                  foldersToCreate.get(i).create(false, true, new NullProgressMonitor());
                }           
                // create tml file           
                      String header = Plugin.getDefault().getHeaderFileMap().get(Plugin.HEADER_TML_MODUL).getHeaderForProject(fileToCreate.getProject())
                      fileToCreate.create(new ByteArrayInputStream(header.getBytes()), true, new NullProgressMonitor());             
                // open editor
                WorkbenchUtils.openEditor(Plugin.getDefault().getWorkbench(), fileToCreate, ResourceIDs.EDITOR_TML);
              } catch (CoreException e) {
              }       
            }
    View Full Code Here

    Examples of java.io.ByteArrayInputStream

                }
                for (int i=foldersToCreate.size() - 1; i >= 0; i--) {
                  foldersToCreate.get(i).create(false, true, new NullProgressMonitor());
                }           
                // create tml file
                fileToCreate.create(new ByteArrayInputStream(new byte[0]), true, new NullProgressMonitor());
                // open editor
                WorkbenchUtils.openEditor(Plugin.getDefault().getWorkbench(), fileToCreate);
              } catch (CoreException e) {
              }       
            }
    View Full Code Here
    TOP
    Copyright © 2018 www.massapi.com. All rights reserved.
    All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.