Recording Streaming Audio?


I use a Bluesound Node 2 for streaming. Can I run the Node's digital output to a cd recorder or other recording device? Would the scenario change any if I ran the Node's digital  input to a dac that has a digital output, like pro audio gear and some consumer products offer? Would this be considered pirating? (I realize this isn't exactly a pc audio topic but I thought this would be the best place) Thanks for any input
mkaes
I can record any coax or optical input through my RME ADI 2 DAC via USB connection to my computer...just started playing with that feature, so can't really answer a lot about it, other than it can and sounds quite good 
So, technically speaking, you do not have the right to fully own and playback music at any time if you have recorded it from a streaming source.  When you buy a CD or audio file from a distributor, you are actually buying the "license" to own and play that music "for yourself" anytime.  That being said, it's pretty much impossible to stop people from just recording analog music "off the air".   It is so prevalent that companies don't even bother trying to enforce that legal/law.

This is why MQA was implemented to stream hi resolution audio from streaming sources such as Quboz and Tidal.  MQA is just an encrypted format which just contains standard high res audio files (24/96, 24/192, etc.).  It prevents you from recording/copying the original digital data.  That being said, you can always record the analog output from a DAC that supports MQA (though it is still technically illegal). 

The same thing was implemented with HDMI and HDCP (an encryption algorithm that prevents people from copying/storing any data over HDMI).

If you have a streaming source that is just sending S/PDIF in unencrypted format, there is a possibility of recording that with a Pro Audio digital recorder.
My Sugarcube SC-2 by Sweetvinyl will digitize into files any audio I send to it, in real time, up to 24/192, FLAC and other formats.  I does mean that there is a D>A>D cycle involved, but it still sounds pretty good.
You can use Joyoshare Audio Recorder to record the audio, so that the sound quality can be retained to the best extent. It would be OK if you don't distribute it to others.
This may be useful to know, I use a software program called Sound Tap Streaming Recorder. It records anything you stram and you can record in MP3 , flac and wav also at different bit rates if you are so inclined. They also make an editor called Sound Pad Wave editor and you get I think 30 days to evaluate it. I puchased the Sound Tap software about an hour after the install as I was so pleased with the results. Give it a try it can't do any harm.
Not sure of the connections on your device, but maybe you could run your input into a laptop/desktop running inexpensive recording software (TotalRecorder, and others) and capture it there as a MP3, flac or other file type as selected in the software. As for legality, don't know.