Skip to content

Commit

Permalink
Fix #10
Browse files Browse the repository at this point in the history
  • Loading branch information
astares committed May 28, 2024
1 parent d507eec commit 02fa5ed
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/XML-Parser/XMLPharoFileReferenceReadStreamFactory.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"
A StandardFileStream read stream factory. This stream is preferred for Squeak/Pharo because it does no decoding and returns byte characters so XMLParser can do its own decoding.
"
Class {
#name : 'XMLPharoFileReferenceReadStreamFactory',
#superclass : 'XMLFileReadStreamFactory',
#category : 'XML-Parser-Files',
#package : 'XML-Parser',
#tag : 'Files'
}

{ #category : 'basic' }
XMLPharoFileReferenceReadStreamFactory class >> basicOnPath: aPathString [
^ aPathString asFileReference ensureCreateFile binaryReadStream
]

{ #category : 'testing' }
XMLPharoFileReferenceReadStreamFactory class >> isSupportedImplementation [
^ XMLClassFinder hasClassNamed: #ZnBufferedReadStream
]
20 changes: 20 additions & 0 deletions src/XML-Parser/XMLPharoFileReferenceWriteStreamFactory.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"
A StandardFileStream write stream factory. This stream is preferred for Pharo/Squeak because it does no encoding and accepts byte characters so XMLParser can do its own encoding.
"
Class {
#name : 'XMLPharoFileReferenceWriteStreamFactory',
#superclass : 'XMLFileWriteStreamFactory',
#category : 'XML-Parser-Files',
#package : 'XML-Parser',
#tag : 'Files'
}

{ #category : 'basic' }
XMLPharoFileReferenceWriteStreamFactory class >> basicOnPath: aPathString [
^ aPathString asFileReference ensureCreateFile binaryWriteStream
]

{ #category : 'testing' }
XMLPharoFileReferenceWriteStreamFactory class >> isSupportedImplementation [
^ XMLClassFinder hasClassNamed: #ZnBufferedWriteStream
]

0 comments on commit 02fa5ed

Please sign in to comment.