2010/06/16(Wed) 14:57:22 編集(投稿者)
返信ありがとうございます。
現状はこんな感じで.slkを作っておいてそれを.zipにしています。
Dim outStream As New java.util.zip.ZipOutputStream(New java.io.FileOutputStream(directry & filename))
Dim Path As string="ファイル.slk"
Private Sub putFileToZip(ByVal outStream As java.util.zip.ZipOutputStream, ByVal Path As String)
Dim size As Integer = CInt(FileLen(Path))
Dim inStream As New java.io.BufferedInputStream(New java.io.FileInputStream(Path))
Dim crc As New java.util.zip.CRC32
Dim buf(size - 1) As SByte
If inStream.read(buf, 0, size) <> -1 Then
crc.update(buf, 0, size)
outStream.write(buf, 0, size)
End If
Dim entry As New java.util.zip.ZipEntry(System.IO.Path.GetFileName(Path))
entry.setMethod(java.util.zip.ZipEntry.DEFLATED)
entry.setSize(size)
entry.setCrc(crc.getValue())
outStream.putNextEntry(entry)
inStream.close()
outStream.closeEntry()
outStream.flush()
End Sub
=====================================
MemoryStreamを使って
Dim memStream As New System.IO.MemoryStream(System.Text.Encoding.UTF8.GetBytes("文字列"))
の後、putFileToZipの中身をどう変更すればいいのかさっぱりで…自分が情けない